From a7c5525133a381c982d5a184b5ca52e4b54f8a4b Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Sun, 2 May 2021 15:29:33 +0900 Subject: Fix parser to recognize property expressions in bracket expressions --- compiler/parser_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'compiler/parser_test.go') 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 @@ -487,6 +487,17 @@ func TestParser_parse(t *testing.T) { newEndMarkerNodeWithPos(1, endPos(3)), ), }, + { + pattern: "[\\u{004E}]", + ast: newConcatNode( + newSymbolNodeWithPos(byte('N'), symPos(1)), + newEndMarkerNodeWithPos(1, endPos(2)), + ), + }, + { + pattern: "[\\p{Lu}]", + skipTestAST: true, + }, { pattern: "a[]", syntaxError: synErrBExpNoElem, -- cgit v1.2.3