From 5b3bc26c3bcedc9b42200798181f49dd83566588 Mon Sep 17 00:00:00 2001 From: Jihyeon Gim Date: Wed, 21 Aug 2024 19:25:59 +0900 Subject: improves field handling when inherited attrs are changed Signed-off-by: Jihyeon Gim --- browser-ext/src/web-parse.ts | 2 +- server/src/parser.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browser-ext/src/web-parse.ts b/browser-ext/src/web-parse.ts index f5db7b6..4c0e80f 100644 --- a/browser-ext/src/web-parse.ts +++ b/browser-ext/src/web-parse.ts @@ -253,7 +253,7 @@ function fields(state: ParserState) : boolean { let match; // Moo/Moose/Object::Pad/Moops/Corinna attributes - if ((match = state.stmt.match(/^(?:has|field)(?:\s+|\()["']?([\$@%]?\w+)\b/))) { + if ((match = state.stmt.match(/^(?:has|field)(?:\s+|\()["']?\+?([\$@%]?\w+)\b/))) { const attr = match[1]; let type; if(attr.match(/^\w/)){ diff --git a/server/src/parser.ts b/server/src/parser.ts index 700a5a5..f74ea97 100644 --- a/server/src/parser.ts +++ b/server/src/parser.ts @@ -301,7 +301,7 @@ function constants(state: ParserState): boolean { function fields(state: ParserState): boolean { let match; // Moo/Moose/Object::Pad/Moops/Corinna attributes - if ((match = state.stmt.match(/^(?:has|field)(?:\s+|\()["']?([\$@%]?\w+)\b/))) { + if ((match = state.stmt.match(/^(?:has|field)(?:\s+|\()["']?\+?([\$@%]?\w+)\b/))) { const attr = match[1]; let type; if (attr.match(/^\w/)) { -- cgit v1.2.3