Skip to content

Commit 8b7b72e

Browse files
author
Matthias Kastner
committed
fix constant parsing
previously, a `=` in a comment of the constant definition line caused a wrong identification of the constant's name. now tested with the following constants: ```igorpro StrConstant REQUIRE_MODE1 = "a\\\"bc" // == OUTPUT_MESSAGE | INCREASE_ERROR | ABORT_FUNCTION static Constant REQUIRE_MODE2 = 0x3B // == OUTPUT_MESSAGE | INCREASE_ERROR | ABORT_FUNCTION static Constant REQUIRE_MODE3 = 7 // == OUTPUT_MESSAGE | INCREASE_ERROR | ABORT_FUNCTION static Constant REQUIRE_MODE4 = 7 Constant a=1 Constant c=5 ```
1 parent acb750d commit 8b7b72e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

procedures/CodeBrowser.ipf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Function addDecoratedConstants(module, procedureWithoutModule, declWave, lineWav
341341

342342
// search code and return wavLineNumber
343343
Make/FREE/N=(numLines)/T text = StringFromList(p, procText, "\r")
344-
re = "^(?i)[[:space:]]*((?:override)?(?:static)?[[:space:]]*(?:Str)?Constant)[[:space:]]+(.*)=.*"
344+
re = "^(?i)[[:space:]]*((?:override)?(?:static)?[[:space:]]*(?:Str)?Constant)[[:space:]]+([^=]*)=.*"
345345
Grep/Q/INDX/E=re text
346346
Wave W_Index
347347
Duplicate/FREE W_Index wavLineNumber

0 commit comments

Comments
 (0)