syntax for tblcmp

This commit is contained in:
leaf corcoran 2011-11-05 10:30:20 -07:00
parent e32f0752b8
commit 652e59c96c

View File

@ -311,6 +311,8 @@ local build_grammar = wrap_env(function()
Comprehension = sym"[" * Exp * CompInner * sym"]" / mark"comprehension",
TblComprehension = sym"{" * Exp * (sym"," * Exp)^-1 * CompInner * sym"}" / mark"tblcomprehension",
CompInner = Ct(CompFor * CompClause^0),
CompFor = key"for" * Ct(NameList) * key"in" * (sym"*" * Exp / mark"unpack" + Exp) / mark"for",
CompClause = CompFor + key"when" * Exp / mark"when",
@ -337,6 +339,7 @@ local build_grammar = wrap_env(function()
sym"-" * -SomeSpace * Exp / mark"minus" +
sym"#" * Exp / mark"length" +
key"not" * Exp / mark"not" +
TblComprehension +
TableLit +
Comprehension +
Assign + Update + FunLit + String +