Extend {foo} syntax to allow {"foo"} as well.

Useful when "foo" contains unusual characters. Should help with
the issues #7, #38, #40, #42.
This commit is contained in:
Stephen Dolan committed 2012-12-03 20:31:40 +00:00
1 parent 5f6a95c7b5
commit a88d53d2fd
4 files changed
+20

No files matched your search

+4
View File
@@ -414,6 +414,10 @@ MkDictPair
| String ':' ExpD {
$$ = gen_dictpair($1, $3);
}
| String {
$$ = gen_dictpair($1, BLOCK(gen_op_simple(POP), gen_op_simple(DUP2),
gen_op_simple(DUP2), gen_op_simple(INDEX)));
}
| IDENT {
$$ = gen_dictpair(gen_const(jv_copy($1)),
gen_index(gen_noop(), gen_const($1)));