Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime/syntax/awk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: awk

detect:
filename: "\\.awk$"
header: "^#!.*bin/(env +)?awk( |$)"
header: "^#!.*bin/(env +((-S|--split-string(=\\w+)? +)?)?)?awk( |$)"

rules:
- preproc: "\\$[A-Za-z0-9_!@#$*?\\-]+"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/csx.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
filetype: csharp-script
detect:
filename: "\\.csx$"
header: "^#!.*/(env +)?dotnet-script( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?dotnet-script( |$)"

rules:
- include: "csharp"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/fish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: fish

detect:
filename: "\\.fish$"
header: "^#!.*/(env +)?fish( |$)"
header: "^#!.*/(env +((-S|--split-string=?[^\\s]*) +)?)?fish( |$)"

rules:
# Numbers
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/groovy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: groovy

detect:
filename: "(\\.(groovy|gy|gvy|gsh|gradle)$|^[Jj]enkinsfile$)"
header: "^#!.*/(env +)?groovy *$"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?groovy *$"

rules:
# And the style guide for constants is CONSTANT_CASE
Expand Down
4 changes: 2 additions & 2 deletions runtime/syntax/javascript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: javascript

detect:
filename: "(\\.(m|c)?js$|\\.es[5678]?$)"
header: "^#!.*/(env +)?node( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?node( |$)"

rules:
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
Expand All @@ -27,7 +27,7 @@ rules:

# - constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
- comment: "^#!.*/(env +)?node( |$)"
- comment: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?node( |$)"

- identifier: "\\b(alert|decodeURI|decodeURIComponent|document|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|uneval|window)\\b"
- identifier: "\\b(Intl|WebAssembly)\\b"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/julia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: julia

detect:
filename: "\\.jl$"
header: "^#!.*/(env +)?julia( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?julia( |$)"

rules:

Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/justfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ filetype: 'justfile'

detect:
filename: "(\\.?[Jj]ustfile|\\.just)$"
header: "^#!.*/(env +)?[bg]?just --justfile"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?[bg]?just --justfile"

rules:
- identifier: "^[a-zA-Z_][a-zA-Z0-9_-]*"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/makefile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: makefile

detect:
filename: "([Mm]akefile|\\.ma?k)$"
header: "^#!.*/(env +)?[bg]?make( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?[bg]?make( |$)"

rules:
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/nftables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: nftables

detect:
filename: "(nftables\\.(conf|rules)$|nftables(\\.rules)?\\.d/)"
header: "^(#!.*/(env +)?nft( |$)|flush +ruleset)"
header: "^(#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?nft( |$)|flush +ruleset)"

rules:
- type: "\\b(chain|counter|map|rule|ruleset|set|table)\\b"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/perl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: perl

detect:
filename: "\\.p[lmp]$"
header: "^#!.*/(env +)?perl( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?perl( |$)"

rules:
- type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|homp|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\\b|\\b(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\\b|\\b(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|say|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\\b|\\b(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\\b|\\b(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/python2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: python2

detect:
filename: "\\.py2$"
header: "^#!.*/(env +)?python2$"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?python2$"

rules:

Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/python3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: python

detect:
filename: "\\.py(3|w)?$"
header: "^#!.*/(env +)?python(3)?$"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?python(3)?$"

rules:
# built-in objects
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/ruby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: ruby

detect:
filename: '\.(rb|rake|gemspec)$|^(.*[\\/])?(Gemfile|config\.ru|Rakefile|Capfile|Vagrantfile|Guardfile|Appfile|Fastfile|Pluginfile|Podfile|\.?[Bb]rewfile)$'
header: "^#!.*/(env +)?ruby( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?ruby( |$)"

rules:
- comment.bright:
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/sage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: sage

detect:
filename: "\\.sage$"
header: "^#!.*/(env +)?sage( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?sage( |$)"

rules:

Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/sed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: sed

detect:
filename: "\\.sed$"
header: "^#!.*bin/(env +)?sed( |$)"
header: "^#!.*bin/(env +((-S|--split-string(=\\w+)? +)?)?)?sed( |$)"

rules:
- symbol.operator: "[|^$.*+]"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/sh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ filetype: shell
# * bash-fc. (followed by a random string)
detect:
filename: "(\\.(sh|bash|ash|ebuild)$|(\\.bash(rc|_aliases|_functions|_profile)|\\.?profile|Pkgfile|pkgmk\\.conf|rc\\.conf|PKGBUILD|APKBUILD)$|bash-fc\\.)"
header: "^#!.*/(env +)?(ba)?(a)?(mk)?sh( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?(ba)?(a)?(mk)?sh( |$)"

rules:
# Numbers
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: swift

detect:
filename: "\\.swift$"
header: "^#!.*bin/(env +)?swift( |$)"
header: "^#!.*bin/(env +((-S|--split-string(=\\w+)? +)?)?)?swift( |$)"

rules:

Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/tcl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: tcl

detect:
filename: "\\.tcl$"
header: "^#!.*/(env +)?tclsh( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?tclsh( |$)"

rules:
- statement: "\\b(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|else|elseif|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\\b"
Expand Down
2 changes: 1 addition & 1 deletion runtime/syntax/zsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ filetype: zsh

detect:
filename: "(\\.zsh$|\\.?(zshenv|zprofile|zshrc|zlogin|zlogout)$)"
header: "^#!.*/(env +)?zsh( |$)"
header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?zsh( |$)"

rules:
## Numbers
Expand Down