Skip to content

version 0.1.8

Compare
Choose a tag to compare
@st0012 st0012 released this 04 Mar 15:46
· 750 commits to master since this release

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

Add t.Helper() to test helper functions