Skip to content

prabushi/ballerina-grammar

This branch is 201 commits behind ballerina-platform/ballerina-grammar:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 6, 2021
Jun 1, 2021
Jun 1, 2021
Apr 5, 2018
Apr 2, 2018
Oct 21, 2020
May 18, 2019
Jun 5, 2018
Sep 18, 2020
Apr 2, 2018
Feb 9, 2021
Feb 9, 2021
Apr 2, 2018

Repository files navigation

ballerina-grammar

This repository contains the .tmlanguage file describbing the ballerina language grammar. Currently its consumed by the ballerina vscode plugin to provide syntax highlighting for ballerina.

Contributing

As .tmLanguage files which are of plist format are rather hard to read to the human eye ballerina.tmLanguage file is generated from the ballerina.YAML-tmLaguage YAML file.

Any modifications by hand should be done only to this YAML file.

To generate the tmLanguage file,

npm install
npm run build

Generate language files via the scripts

  • ballerina.YAML-tmLanguage

    • Run node extract-keywords.js [path to ballerina-lang/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/LexerTerminals.java]
    • Update ballerina.YAML-tmLanguage file with changes
  • ballerina.tmLanguage

    • Run node build-tm.js
  • ballerina.monarch.json

    • Run node build-monarch.js
  • prism-ballerina.js

    • Run cd prism && node extract-keywords.js [path to ballerina-lang/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/LexerTerminals.java]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ballerina 77.7%
  • JavaScript 19.0%
  • HTML 3.3%