Skip to content

Commit

Permalink
Merge branch '1.5.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
odino committed Jul 28, 2019
2 parents 22d3447 + 85742c5 commit 2cefcfd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/installer.sh
Expand Up @@ -27,7 +27,7 @@ if [ "${MACHINE_TYPE}" = 'x86_64' ]; then
ARCH="amd64"
fi

VERSION=1.5.0
VERSION=1.5.1

echo "Trying to detect the details of your architecture."
echo ""
Expand Down
2 changes: 1 addition & 1 deletion docs/types/builtin-function.md
Expand Up @@ -243,7 +243,7 @@ $ cat ~/.absrc
source("~/abs/lib/library.abs")
$ abs
Hello user, welcome to the ABS (1.5.0) programming language!
Hello user, welcome to the ABS (1.5.1) programming language!
Type 'quit' when you are done, 'help' if you get lost!
⧐ adder(1, 2)
3
Expand Down
6 changes: 6 additions & 0 deletions evaluator/evaluator_test.go
Expand Up @@ -1219,12 +1219,18 @@ func TestCommand(t *testing.T) {
{"`echo hello world`", "hello world"},
}
} else {
executor := "bash"
if runtime.GOOS == "windows" {
executor = "cmd.exe"
}

// bash commands
tests = []testLine{
{`a = "A"; b = "B"; eee = "-e"; $(echo $eee -n $a$a$b$b$c$c)`, "AABB"},
{`$(echo -n "123")`, "123"},
{`$(echo -n hello world)`, "hello world"},
{`$(echo hello world | xargs echo -n)`, "hello world"},
{`$(echo \$0)`, executor},
{`$(echo \$CONTEXT)`, "abs"},
{"a = 'A'; b = 'B'; eee = '-e'; `echo $eee -n $a$a$b$b$c$c`", "AABB"},
{"`echo -n '123'`", "123"},
Expand Down
2 changes: 1 addition & 1 deletion main.go
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/abs-lang/abs/repl"
)

var Version = "1.5.0"
var Version = "1.5.1"

// The ABS interpreter
func main() {
Expand Down
2 changes: 1 addition & 1 deletion util/util.go
Expand Up @@ -62,7 +62,7 @@ func GetEnvVar(env *object.Environment, varName, defaultVal string) string {
func InterpolateStringVars(str string, env *object.Environment) string {
// Match all strings preceded by
// a $ or a \$
re := regexp.MustCompile("(\\\\)?\\$([a-zA-Z_]{1,})")
re := regexp.MustCompile("(\\\\)?\\$([a-zA-Z_0-9]{1,})")
str = re.ReplaceAllStringFunc(str, func(m string) string {
// If the string starts with a backslash,
// that's an escape, so we should replace
Expand Down

0 comments on commit 2cefcfd

Please sign in to comment.