Skip to content

Commit

Permalink
switch to new syntax format
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Feb 11, 2016
1 parent 2810e26 commit 3b80d6e
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 228 deletions.
76 changes: 76 additions & 0 deletions nsL Assembler.sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: nsL Assembler
file_extensions:
- nsl
scope: source.nsl
contexts:
main:
- match: (\b|^\s*)(?i)#(define|else|endif|if|ifend|macro|macroend|nsis|nsisend|return)\b
scope: string.compiler.nsl
- match: (\b|^\s*)(?i)(Abort|AddBrandingImage|AddIncludeDir|AddPluginDir|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileRecursive|FileSeek|FileWrite|FileWriteByte|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|Include|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|IntFmt|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadLanguageFile|LockWindow|LogSet|LogText|MessageBox|MiscButtonText|Name|OutFile|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|ReserveFileRecursive|RMDir|RMDirRecursive|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUninstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UnRegDLL|VIAddVersionKey|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegStr|WriteUninstaller|XPStyle)\b
scope: keyword.command.nsl
- match: \w+\:\:\w+
scope: keyword.function.nsl
- match: (\b|^\s*)(?i)(break|case|default|do|else|for|function|if|page|return|section|switch|uninstall function|uninstall page|uninstall section|while)\b
scope: support.function.nsl
- match: (\b|^\s*)(?i)(MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES)\b
scope: constant.helpers.nsl
- match: '[\\A-Za-z_.][\\A-Za-z_0-9]*(?=\s*\()'
scope: meta.function.nsl
- match: \b(admin|all|auto|both|current|false|force|hide|highest|ifdiff|ifnewer|lastused|listonly|nevershow|none|normal|off|on|show|silent|silentlog|textonly|true|user)\b
scope: constant.flags.nsl
- match: '\b((0(x|X)[0-9a-fA-F])|([0-9\.\,]+))\b'
scope: constant.numeric.nsl
- match: '@\\$[\\w]+'
scope: variable.name.unchecked.nsl
- match: '\$[\w]+'
scope: variable.name.nsl
- match: "`"
captures:
0: punctuation.definition.string.begin.nsl
push:
- meta_scope: string.quoted.back.nsl
- match: (`)|(\n)
captures:
0: punctuation.definition.string.end.nsl
pop: true
- match: \$\\.
scope: constant.character.escape.nsl
- match: '"'
captures:
0: punctuation.definition.string.begin.nsl
push:
- meta_scope: string.quoted.double.nsl
- match: (")|(\n)
captures:
0: punctuation.definition.string.end.nsl
pop: true
- match: \$\\.
scope: constant.character.escape.nsl
- match: "'"
captures:
0: punctuation.definition.string.begin.nsl
push:
- meta_scope: string.quoted.single.nsl
- match: (')|(\n)
captures:
0: punctuation.definition.string.end.nsl
pop: true
- match: \$\\.
scope: constant.character.escape.nsl
- match: (//).*$\n?
scope: comment.line.nsl
captures:
1: punctuation.definition.comment.nsl
- match: /\*
captures:
0: punctuation.definition.comment.nsl
push:
- meta_scope: comment.block.nsl
- match: \*/
captures:
0: punctuation.definition.comment.nsl
pop: true
- include: scope:source.nsis
228 changes: 0 additions & 228 deletions nsL Assembler.tmLanguage

This file was deleted.

0 comments on commit 3b80d6e

Please sign in to comment.