Skip to content
This repository was archived by the owner on Sep 2, 2020. It is now read-only.

Commit ba4096b

Browse files
leebyronasiandrummer
authored andcommitted
Parse BlockString (#194)
Adds the BlockString rule to the String regex parser. I noticed there are no unit tests for the parser in this repo, so tested with https://regexr.com/3iclo
1 parent 9a3aa02 commit ba4096b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/parser/src/Rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const LexRules = {
4242
Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
4343

4444
// Note the closing quote is made optional as an IDE experience improvment.
45-
String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
45+
String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,
4646

4747
// Comments consume entire lines.
4848
Comment: /^#.*/,

0 commit comments

Comments
 (0)