diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-11 20:05:12 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-11 20:05:18 -0700 |
| commit | b9827b1745e3b633666483ed0a8df35714a7fc4f (patch) | |
| tree | fcec8f6fef4cfa11e32e6483087d0bdc8f0591ab /nomsu.peg | |
| parent | ab8ccf4e274d7a4fbb5d95e0fc20b71bafbc98dc (diff) | |
Work in progress...
Diffstat (limited to 'nomsu.peg')
| -rw-r--r-- | nomsu.peg | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -100,10 +100,12 @@ indented_dict (Dict): |} -> Tuple) (dedent / (("" -> "Error while parsing dict") => error)) dict_line: - (((inline_expression / word) %ws* ":" %ws* (functioncall / expression)) -> DictEntry !comma) + ((dict_key %ws* ":" %ws* (functioncall / expression)) -> DictEntry !comma) / (inline_dict_item (comma dict_line?)?) inline_dict_item: - ((inline_expression / word) %ws* ":" %ws* (inline_functioncall / inline_expression)) -> DictEntry + (dict_key %ws* ":" %ws* (inline_functioncall / inline_expression)) -> DictEntry +dict_key: + (({} ({|{%operator / (!number plain_word)}|} -> Tuple) {}) -> Text) / inline_expression block_comment(Comment): "#.." { [^%nl]* (%nl+ %indent [^%nl]* (%nl+ %nodent [^%nl]*)* %dedent)? } line_comment(Comment): "#" { [^%nl]* } |
