Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Grammars Compiler #3915

Merged
merged 15 commits into from
Nov 30, 2017
Merged
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
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,6 @@
[submodule "vendor/grammars/sublime-golo"]
path = vendor/grammars/sublime-golo
url = https://github.com/TypeUnsafe/sublime-golo
[submodule "vendor/grammars/JSyntax"]
path = vendor/grammars/JSyntax
url = https://github.com/bcj/JSyntax
[submodule "vendor/grammars/TXL"]
path = vendor/grammars/TXL
url = https://github.com/MikeHoffert/Sublime-Text-TXL-syntax
Expand Down Expand Up @@ -892,3 +889,9 @@
[submodule "vendor/grammars/Syntax-highlighting-for-PostCSS"]
path = vendor/grammars/Syntax-highlighting-for-PostCSS
url = https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS
[submodule "vendor/grammars/javadoc.tmbundle"]
path = vendor/grammars/javadoc.tmbundle
url = https://github.com/textmate/javadoc.tmbundle
[submodule "vendor/grammars/JSyntax"]
path = vendor/grammars/JSyntax
url = https://github.com/tikkanz/JSyntax
5 changes: 3 additions & 2 deletions grammars.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz:
- source.systemverilog
- source.ucfconstraints
Expand Down Expand Up @@ -344,6 +343,8 @@ vendor/grammars/java.tmbundle:
- source.java-properties
- text.html.jsp
- text.junit-test-report
vendor/grammars/javadoc.tmbundle:
- text.html.javadoc
vendor/grammars/javascript-objective-j.tmbundle:
- source.js.objj
vendor/grammars/jflex.tmbundle:
Expand Down Expand Up @@ -574,7 +575,7 @@ vendor/grammars/opa.tmbundle:
- source.opa
vendor/grammars/openscad.tmbundle:
- source.scad
vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage:
vendor/grammars/oz-tmbundle:
- source.oz
vendor/grammars/parrot:
- source.parrot.pir
Expand Down
7 changes: 0 additions & 7 deletions package.json

This file was deleted.

4 changes: 2 additions & 2 deletions script/add-grammar
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ if repo_old
log "Deregistering: #{repo_old}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move scripts to the new tools/ directory or is there a clear distinction between the two (besides the fact that one contains scripting language programs)? If the idea is to always use tools through scripts maybe tools/ should be a subdirectory (with a new name?) in script/...?

`git submodule deinit #{repo_old}`
`git rm -rf #{repo_old}`
`script/convert-grammars`
`script/grammar-compiler -update`
end

log "Registering new submodule: #{repo_new}"
`git submodule add -f #{https} #{repo_new}`
exit 1 if $?.exitstatus > 0
`script/convert-grammars --add #{repo_new}`
`script/grammar-compiler -add #{repo_new}`

log "Confirming license"
if repo_old
Expand Down
319 changes: 0 additions & 319 deletions script/convert-grammars

This file was deleted.

12 changes: 12 additions & 0 deletions script/grammar-compiler
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -e
cd "$(dirname "$0")/.."

image="linguist/grammar-compiler:latest"
mkdir -p grammars

exec docker run --rm \
-u $(id -u $USER):$(id -g $USER) \
-v $PWD:/src/linguist \
-w /src/linguist -ti $image "$@"
Loading