Skip to content

Commit

Permalink
Add support for escaping newlines.
Browse files Browse the repository at this point in the history
Co-authored-by: Amaan Qureshi <[email protected]>
  • Loading branch information
tgross35 and amaanq committed Feb 18, 2024
1 parent d9c053e commit 6dc3911
Show file tree
Hide file tree
Showing 5 changed files with 481 additions and 452 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// <reference types="tree-sitter-cli/dsl" />
// @ts-check

const ESCAPE_SEQUENCE = token(/\\[nrt"\\]/);
const ESCAPE_SEQUENCE = token(/\\([nrt"\\]|(\r?\n))/);

/** Comma separated list with at least one item */
function comma_sep1(item) {
Expand Down
3 changes: 2 additions & 1 deletion src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6dc3911

Please sign in to comment.