version 0.1.8
Upgrade Go's version to 1.10
Features
Support String
's range indexing
s = "Hello!"
puts(s[1..3]) #=> ell
Fixes
Testing
Add AST testing helpers
For example, to test
def add(x, y)
x + y
end
We can now write it like:
firstStmt := program.FirstStmt().IsDefStmt(t)
firstStmt.ShouldHasName("add")
firstStmt.ShouldHasNormalParam("x")
firstStmt.ShouldHasNormalParam("y")
firstExpression := firstStmt.MethodBody().NthStmt(1).IsExpression(t)
infixExp := firstExpression.IsInfixExpression(t)
infixExp.ShouldHasOperator("+")
infixExp.TestableLeftExpression().IsIdentifier(t).ShouldHasName("x")
infixExp.TestableRightExpression().IsIdentifier(t).ShouldHasName("y")
Add Integration tests for simple server
See #604