File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 99 - ' syntaxes/*.yml'
1010
1111jobs :
12- convert -grammars :
12+ gen-json -grammars :
1313 runs-on : ubuntu-latest
1414 steps :
1515 - uses : actions/checkout@v3
1919 -
uses :
tiabeast/[email protected] 2020 - run : npm install
2121 - name : Run grammar converter and push changes
22- run : bait run scripts/convert_grammars .bt
22+ run : bait run scripts/gen_json_grammar .bt
2323 env :
2424 BOT_TOKEN : ${{ secrets.BOT_TOKEN }}
Original file line number Diff line number Diff line change @@ -27,14 +27,20 @@ fun main() {
2727 os.rmdir_all(target_repo_dir)
2828 }
2929
30+ // Clone repo as bot user
3031 access_token := os.getenv('BOT_TOKEN')
3132 errors += git_command('clone --depth 1 https://${GIT_USER}:${access_token}@github.com/tiabeast/vscode-vba-json.git ${target_repo_dir}')
3233
34+ // Run conversion
3335 errors += os.system('npm run convert-yaml')
34- os.cp('./out', '${target_repo_dir}/syntaxes')
36+
37+ // Copy syntax files
38+ syntax_dir := '${target_repo_dir}/syntaxes'
39+ os.cp('./out/vba.tmGrammar.json', '${syntax_dir}/vba.tmGrammar.json')
40+ os.cp('./out/wwb.tmGrammar.json', '${syntax_dir}/wwb.tmGrammar.json')
3541
3642 // Sanity check for a reasonable file size
37- text := os.read_file(target_repo_dir + '/syntaxes /vba.tmGrammar.json')
43+ text := os.read_file(syntax_dir + '/vba.tmGrammar.json')
3844 if text.length < 1000 {
3945 eprintln('grammar is too small. Something went wrong.')
4046 exit(1)
Original file line number Diff line number Diff line change 11// This file is part of vscode-vba.
22// Copyright (c) 2021-present Lukas Neubert
33// This Source Code is subject to the terms of the Mozilla Public License 2.0.
4+ package extension
45
56import 'vscode' as #JS.vscode
67
You can’t perform that action at this time.
0 commit comments