diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-02 15:29:33 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-02 15:29:33 +0900 |
commit | a7c5525133a381c982d5a184b5ca52e4b54f8a4b (patch) | |
tree | 6cc8a6b5ec2d47b30d5c7d8bd86c7b143fb3587b /compiler/parser_test.go | |
parent | Improve compilation time a little (diff) | |
download | tre-a7c5525133a381c982d5a184b5ca52e4b54f8a4b.tar.gz tre-a7c5525133a381c982d5a184b5ca52e4b54f8a4b.tar.xz |
Fix parser to recognize property expressions in bracket expressions
Diffstat (limited to 'compiler/parser_test.go')
-rw-r--r-- | compiler/parser_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/parser_test.go b/compiler/parser_test.go index 79f89ff..aca08ec 100644 --- a/compiler/parser_test.go +++ b/compiler/parser_test.go @@ -488,6 +488,17 @@ func TestParser_parse(t *testing.T) { ), }, { + pattern: "[\\u{004E}]", + ast: newConcatNode( + newSymbolNodeWithPos(byte('N'), symPos(1)), + newEndMarkerNodeWithPos(1, endPos(2)), + ), + }, + { + pattern: "[\\p{Lu}]", + skipTestAST: true, + }, + { pattern: "a[]", syntaxError: synErrBExpNoElem, }, |