enh(nsis) Update defines pattern#3417
enh(nsis) Update defines pattern#3417joshgoebel merged 6 commits intohighlightjs:mainfrom idleberg:patch-2
Conversation
Defines can include `!`-characters, as seen in this example: https://nsis.sourceforge.io/Check_if_a_file_exists_at_compile_time
|
I see a lot of |
This is the relevant line: !define !defineifexist "!insertmacro !defineifexist"It's basically a shortcut that assigns the # Default !insertmacro syntax
!insertmacro !defineexists [params]
# Shortcut for !insertmacro
${!defineexist} [params]PS: Unlike variables, defines can begin with any allowed characters – including |
|
Since I think the syntax in the linked example is kind of terrible, here's a version that only uses !macro DefineIfExist _VAR_NAME _FILE_NAME
# macro code omitted for brevity
!macroend
!define !defineifexist "!insertmacro DefineIfExist"In NSIS, all compile-time commands begin with a |
CHANGES.md
Outdated
| - enh(clojure) Add `regex` mode to regex literal | ||
| - fix(clojure) Remove inconsistent/broken highlighting for metadata | ||
| - enh(clojure) Add `punctuation` mode for commas. | ||
| - enh(nsis) Update defines pattern to allow `!` (#3417) [idleberg][] |
There was a problem hiding this comment.
Please add your name around line ~30 also. Each version needs the name repeated, even if you've contributed in the past.
joshgoebel
left a comment
There was a problem hiding this comment.
Needs name attribution for changelog.
Updates pattern for NSIS defines to allow
!-characters. This example from the NSIS wiki has an example that uses this.Changes
Allow
!in defines regex patternChecklist
CHANGES.md