diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-15 15:50:18 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-15 15:50:32 -0800 |
| commit | d82c4f85d8cdb1d4cdf97e90b2715d2fb06b4bef (patch) | |
| tree | e31b18f7e575b39960a6ab220b6604a09bde6c11 /nomsu.peg | |
| parent | 5a526675db93ea95efc82af7fc6c8f80b0275e8a (diff) | |
Added support for translating comments instead of dropping them.
Diffstat (limited to 'nomsu.peg')
| -rw-r--r-- | nomsu.peg | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -92,8 +92,8 @@ dict_line: inline_dict_item: {| {:dict_key: inline_expression / word :} %ws* "=" %ws* {:dict_value: inline_functioncall / inline_expression :} |} -block_comment: "#.." [^%nl]* (%nl (%ws* &%nl))* %nl %indented [^%nl]+ (%nl ((%ws* ((!.) / &%nl)) / (!%dedented [^%nl]+)))* -line_comment: "#" [^%nl]* +block_comment(Comment): "#.." { [^%nl]* (%nl (%ws* &%nl))* %nl %indented [^%nl]+ (%nl ((%ws* ((!.) / &%nl)) / (!%dedented [^%nl]+)))* } +line_comment(Comment): "#" { [^%nl]* } eol: %ws* line_comment? (!. / &%nl) ignored_line: (%nodented (block_comment / line_comment)) / (%ws* (!. / &%nl)) |
