Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
redo syntax in a dry style
  • Loading branch information
ingydotnet committed Dec 26, 2012
1 parent af2cd33 commit 008bfa6
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions syntax2.tml
@@ -0,0 +1,39 @@
%TestML 0.1.0

Plan = 7

compare(*testml)

a b, c

compare = ->
list = testml.SplitByBlankLines
ast = list.shift.compile.yaml
list.each (testml)->
$Label = '$BlockLabel - '
+ testml.FirstLine.Chomp
ast == testml.compile.yaml

=== Optional semi-colons
--- testml
Plan = 123;
*a == *b;

Plan = 123; *a == *b;

Plan = 123; *a == *b

Plan = 123
*a == *b

=== Empty Function
--- testml
a = ->

a = {}

a = ()->

a = () ->

a = () {}

0 comments on commit 008bfa6

Please sign in to comment.