Skip to content

Commit

Permalink
Merge branch 'main' into quickbasic
Browse files Browse the repository at this point in the history
  • Loading branch information
DecimalTurn authored Nov 26, 2024
2 parents 4e618b9 + 120e0e5 commit f5030ef
Show file tree
Hide file tree
Showing 62 changed files with 4,976 additions and 218 deletions.
30 changes: 21 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@
[submodule "vendor/grammars/atom-fstar"]
path = vendor/grammars/atom-fstar
url = https://github.com/FStarLang/atom-fstar
[submodule "vendor/grammars/atom-language-1c-bsl"]
path = vendor/grammars/atom-language-1c-bsl
url = https://github.com/xDrivenDevelopment/atom-language-1c-bsl.git
[submodule "vendor/grammars/atom-language-clean"]
path = vendor/grammars/atom-language-clean
url = https://github.com/timjs/atom-language-clean.git
Expand Down Expand Up @@ -389,9 +386,6 @@
[submodule "vendor/grammars/clarity.tmbundle"]
path = vendor/grammars/clarity.tmbundle
url = https://github.com/hirosystems/clarity.tmbundle.git
[submodule "vendor/grammars/cmake.tmbundle"]
path = vendor/grammars/cmake.tmbundle
url = https://github.com/textmate/cmake.tmbundle
[submodule "vendor/grammars/code-peggy-language"]
path = vendor/grammars/code-peggy-language
url = https://github.com/peggyjs/code-peggy-language.git
Expand Down Expand Up @@ -833,6 +827,9 @@
[submodule "vendor/grammars/language-toc-wow"]
path = vendor/grammars/language-toc-wow
url = https://github.com/nebularg/language-toc-wow
[submodule "vendor/grammars/language-tools"]
path = vendor/grammars/language-tools
url = https://github.com/vuejs/language-tools.git
[submodule "vendor/grammars/language-tsql"]
path = vendor/grammars/language-tsql
url = https://github.com/beau-witter/language-tsql
Expand Down Expand Up @@ -926,6 +923,9 @@
[submodule "vendor/grammars/monkey"]
path = vendor/grammars/monkey
url = https://github.com/gingerbeardman/monkey.tmbundle
[submodule "vendor/grammars/moonbit-tmLanguage"]
path = vendor/grammars/moonbit-tmLanguage
url = https://github.com/moonbitlang/moonbit-tmLanguage.git
[submodule "vendor/grammars/moonscript-tmbundle"]
path = vendor/grammars/moonscript-tmbundle
url = https://github.com/leafo/moonscript-tmbundle
Expand All @@ -950,6 +950,9 @@
[submodule "vendor/grammars/ocaml.tmbundle"]
path = vendor/grammars/ocaml.tmbundle
url = https://github.com/textmate/ocaml.tmbundle
[submodule "vendor/grammars/omnetpp-textmate-ned"]
path = vendor/grammars/omnetpp-textmate-ned
url = https://github.com/omnetpp/omnetpp-textmate-ned.git
[submodule "vendor/grammars/ooc.tmbundle"]
path = vendor/grammars/ooc.tmbundle
url = https://github.com/nilium/ooc.tmbundle
Expand Down Expand Up @@ -1214,6 +1217,9 @@
[submodule "vendor/grammars/syntax-mcfunction"]
path = vendor/grammars/syntax-mcfunction
url = https://github.com/MinecraftCommands/syntax-mcfunction.git
[submodule "vendor/grammars/tact-sublime"]
path = vendor/grammars/tact-sublime
url = https://github.com/tact-lang/tact-sublime.git
[submodule "vendor/grammars/tcl.tmbundle"]
path = vendor/grammars/tcl.tmbundle
url = https://github.com/textmate/tcl.tmbundle
Expand All @@ -1238,6 +1244,9 @@
[submodule "vendor/grammars/turtle.tmbundle"]
path = vendor/grammars/turtle.tmbundle
url = https://github.com/peta/turtle.tmbundle
[submodule "vendor/grammars/typespec"]
path = vendor/grammars/typespec
url = https://github.com/microsoft/typespec.git
[submodule "vendor/grammars/typst-grammar"]
path = vendor/grammars/typst-grammar
url = https://github.com/michidk/typst-grammar.git
Expand All @@ -1253,6 +1262,9 @@
[submodule "vendor/grammars/vsc-fennel"]
path = vendor/grammars/vsc-fennel
url = https://github.com/kongeor/vsc-fennel
[submodule "vendor/grammars/vsc-language-1c-bsl"]
path = vendor/grammars/vsc-language-1c-bsl
url = https://github.com/1c-syntax/vsc-language-1c-bsl.git
[submodule "vendor/grammars/vscode"]
path = vendor/grammars/vscode
url = https://github.com/QB64Official/vscode.git
Expand All @@ -1274,6 +1286,9 @@
[submodule "vendor/grammars/vscode-cadence"]
path = vendor/grammars/vscode-cadence
url = https://github.com/onflow/vscode-cadence.git
[submodule "vendor/grammars/vscode-cmake-tools"]
path = vendor/grammars/vscode-cmake-tools
url = https://github.com/microsoft/vscode-cmake-tools.git
[submodule "vendor/grammars/vscode-codeql"]
path = vendor/grammars/vscode-codeql
url = https://github.com/github/vscode-codeql
Expand Down Expand Up @@ -1407,9 +1422,6 @@
[submodule "vendor/grammars/vscode_mikrotik_routeros_script"]
path = vendor/grammars/vscode_mikrotik_routeros_script
url = https://github.com/devMikeUA/vscode_mikrotik_routeros_script.git
[submodule "vendor/grammars/vue-syntax-highlight"]
path = vendor/grammars/vue-syntax-highlight
url = https://github.com/vuejs/vue-syntax-highlight
[submodule "vendor/grammars/wgsl-analyzer"]
path = vendor/grammars/wgsl-analyzer
url = https://github.com/wgsl-analyzer/wgsl-analyzer.git
Expand Down
29 changes: 21 additions & 8 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ vendor/grammars/atom-firestore-grammar:
- source.firestore
vendor/grammars/atom-fstar:
- source.fstar
vendor/grammars/atom-language-1c-bsl:
- source.bsl
- source.sdbl
vendor/grammars/atom-language-clean:
- source.clean
- text.restructuredtext.clean
Expand Down Expand Up @@ -318,9 +315,6 @@ vendor/grammars/circom-highlighting-vscode:
- source.circom
vendor/grammars/clarity.tmbundle:
- source.clar
vendor/grammars/cmake.tmbundle:
- source.cache.cmake
- source.cmake
vendor/grammars/code-peggy-language:
- inline.peggy
- source.peggy
Expand Down Expand Up @@ -793,6 +787,13 @@ vendor/grammars/language-ti-basic:
- source.8xp
vendor/grammars/language-toc-wow:
- source.toc
vendor/grammars/language-tools:
- markdown.vue.codeblock
- mdx.vue.codeblock
- source.vue
- vue.directives
- vue.interpolations
- vue.sfc.style.variable.injection
vendor/grammars/language-tsql:
- source.tsql
vendor/grammars/language-turing:
Expand Down Expand Up @@ -865,6 +866,8 @@ vendor/grammars/mojo-syntax:
- source.mojo
vendor/grammars/monkey:
- source.monkey
vendor/grammars/moonbit-tmLanguage:
- source.moonbit
vendor/grammars/moonscript-tmbundle:
- source.moonscript
vendor/grammars/nemerle.tmbundle:
Expand All @@ -887,6 +890,8 @@ vendor/grammars/ocaml.tmbundle:
- source.ocaml
- source.ocamllex
- source.ocamlyacc
vendor/grammars/omnetpp-textmate-ned:
- source.ned
vendor/grammars/ooc.tmbundle:
- source.ooc
vendor/grammars/opa.tmbundle:
Expand Down Expand Up @@ -1084,6 +1089,8 @@ vendor/grammars/syntax:
- source.sentinel
vendor/grammars/syntax-mcfunction:
- source.mcfunction
vendor/grammars/tact-sublime:
- source.tact
vendor/grammars/tcl.tmbundle:
- source.tcl
- text.html.tcl
Expand All @@ -1105,6 +1112,8 @@ vendor/grammars/toml.tmbundle:
vendor/grammars/turtle.tmbundle:
- source.sparql
- source.turtle
vendor/grammars/typespec:
- source.tsp
vendor/grammars/typst-grammar:
- source.typst
vendor/grammars/verilog.tmbundle:
Expand All @@ -1120,6 +1129,9 @@ vendor/grammars/vsc-ember-syntax:
- text.html.ember-handlebars
vendor/grammars/vsc-fennel:
- source.fnl
vendor/grammars/vsc-language-1c-bsl:
- source.bsl
- source.sdbl
vendor/grammars/vscode:
- source.QB64
vendor/grammars/vscode-TalonScript:
Expand All @@ -1138,6 +1150,9 @@ vendor/grammars/vscode-caddyfile:
vendor/grammars/vscode-cadence:
- markdown.cadence.codeblock
- source.cadence
vendor/grammars/vscode-cmake-tools:
- source.cmake
- source.cmakecache
vendor/grammars/vscode-codeql:
- source.ql
vendor/grammars/vscode-cue:
Expand Down Expand Up @@ -1279,8 +1294,6 @@ vendor/grammars/vscode_cobol:
- source.utreport
vendor/grammars/vscode_mikrotik_routeros_script:
- source.rsc
vendor/grammars/vue-syntax-highlight:
- text.html.vue
vendor/grammars/wgsl-analyzer:
- source.wgsl
vendor/grammars/witcherscript-grammar:
Expand Down
31 changes: 31 additions & 0 deletions lib/linguist/generated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def generated?
poetry_lock? ||
pdm_lock? ||
uv_lock? ||
pixi_lock? ||
esy_lock? ||
npm_shrinkwrap_or_package_lock? ||
pnpm_lock? ||
Expand All @@ -91,6 +92,7 @@ def generated?
generated_protocol_buffer_from_go? ||
generated_protocol_buffer? ||
generated_javascript_protocol_buffer? ||
generated_typescript_protocol_buffer? ||
generated_apache_thrift? ||
generated_jni_header? ||
vcr_cassette? ||
Expand Down Expand Up @@ -367,6 +369,28 @@ def generated_javascript_protocol_buffer?
return lines[5].include?("GENERATED CODE -- DO NOT EDIT!")
end

# Internal: Is the blob a TypeScript source file generated by the
# Protocol Buffer compiler?
#
# Files generated by ts-proto typically start with something like this
# (though the versions lines are optional):
#
# // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
# // versions:
# // protoc-gen-ts_proto v1.181.2
# // protoc v5.28.2
# // source: hello.proto
#
# /* eslint-disable */
#
# Returns true or false.
def generated_typescript_protocol_buffer?
return false unless extname == ".ts"
return false unless lines.count > 4

return lines[0].include?("Code generated by protoc-gen-ts_proto. DO NOT EDIT.")
end

APACHE_THRIFT_EXTENSIONS = ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp', '.php']

# Internal: Is the blob generated by Apache Thrift compiler?
Expand Down Expand Up @@ -431,6 +455,13 @@ def uv_lock?
!!name.match(/uv\.lock/)
end

# Internal: Is the blob a generated pixi lock file?
#
# Returns true or false.
def pixi_lock?
!!name.match(/pixi\.lock/)
end

# Internal: Is the blob a generated esy lock file?
#
# Returns true or false.
Expand Down
22 changes: 15 additions & 7 deletions lib/linguist/heuristics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ disambiguations:
- language: QuickBASIC
named_pattern: quickbasic
- language: VBA
and:
- named_pattern: vb-module
- named_pattern: vba
named_pattern: vba
- language: Visual Basic 6.0
named_pattern: vb-module
- extensions: ['.bb']
Expand Down Expand Up @@ -763,6 +761,11 @@ disambiguations:
pattern: '^\s*(?:use\s+v6\b|\bmodule\b|\bmy\s+class\b)'
- language: Turing
pattern: '^\s*%[ \t]+|^\s*var\s+\w+(\s*:\s*\w+)?\s*:=\s*\w+'
- extensions: ['.tact']
rules:
- language: JSON
pattern: '\A\s*\{\"'
- language: Tact
- extensions: ['.tag']
rules:
- language: Java Server Pages
Expand All @@ -782,6 +785,12 @@ disambiguations:
- language: XML
pattern: '<TS\b'
- language: TypeScript
- extensions: ['.tsp']
rules:
- language: TypeSpec
pattern: '^(import|using|namespace|interface|op|model|scalar|alias|union|enum)\s'
- language: TSPLIB data
pattern: '^(NAME|TYPE|DIMENSION|EDGE_WEIGHT_TYPE|EDGE_WEIGHT_FORMAT)\s*:'
- extensions: ['.tst']
rules:
- language: GAP
Expand All @@ -790,10 +799,9 @@ disambiguations:
- language: Scilab
- extensions: ['.tsx']
rules:
- language: TSX
pattern: '^\s*(import.+(from\s+|require\()[''"]react|\/\/\/\s*<reference\s)'
- language: XML
pattern: '(?i:^\s*<\?xml\s+version)'
- language: TSX
- extensions: ['.txt']
rules:
# The following RegExp is simply a collapsed and simplified form of the
Expand Down Expand Up @@ -984,12 +992,12 @@ named_patterns:
- '^[ ]*#If Win64\b'
- '^[ ]*(?:Dim|Const) [0-9a-zA-Z_]*[ ]*As Long(?:Ptr|Long)\b'
# Top module declarations unique to VBA
- '^[ ]*Option (?:Private Module|Compare (?:Database|Text|Binary))\b'
- '^[ ]*Option (?:Private Module|Compare Database)\b'
# General VBA libraries and objects
- '(?: |\()(?:Access|Excel|Outlook|PowerPoint|Visio|Word|VBIDE)\.\w'
- '\b(?:(?:Active)?VBProjects?|VBComponents?|Application\.(?:VBE|ScreenUpdating))\b'
# AutoCAD, Outlook, PowerPoint and Word objects
- '\b(?:ThisDrawing|AcadObject|Active(?:Explorer|Inspector|Window\.Presentation|Presentation|Document)|Selection\.(?:Find|Paragraphs))\b'
- '\b(?:ThisDrawing|AcadObject|Active(?:Explorer|Inspector|Window\.Presentation|Presentation|Document)|Selection\.(?:Document|Find|Paragraphs|Range))\b'
# Excel objects
- '\b(?:(?:This|Active)?Workbooks?|Worksheets?|Active(?:Sheet|Chart|Cell)|WorksheetFunction)\b'
- '\b(?:Range\(".*|Cells\([0-9a-zA-Z_]*, (?:[0-9a-zA-Z_]*|"[a-zA-Z]{1,3}"))\)'
Loading

0 comments on commit f5030ef

Please sign in to comment.