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

feat: add nasal language #5342

Merged
merged 4 commits into from
Oct 16, 2023
Merged

feat: add nasal language #5342

merged 4 commits into from
Oct 16, 2023

Conversation

BobDotCom
Copy link
Contributor

Description of changes:
Adds syntax highlighting for the Nasal scripting language.

Nasal (Not Another Scripting LAnguage) is FlightGear's built-in scripting language.
https://wiki.flightgear.org/Nasal
http://plausible.org/nasal
https://github.com/BobDotCom/Nasal.tmbundle

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@InspiredGuy
Copy link
Contributor

Thank you for the contribution! The build has failed due to one of the regular expressions, could you please take a look? It would also be great if you could add a test for this newly added mode, there are examples of tests in https://github.com/ajaxorg/ace/tree/master/src/mode like https://github.com/ajaxorg/ace/blob/master/src/mode/javascript_test.js

@BobDotCom
Copy link
Contributor Author

Thank you for the contribution! The build has failed due to one of the regular expressions, could you please take a look? It would also be great if you could add a test for this newly added mode, there are examples of tests in https://github.com/ajaxorg/ace/tree/master/src/mode like https://github.com/ajaxorg/ace/blob/master/src/mode/javascript_test.js

@InspiredGuy The regex should be fixed now. Do the tests need to be added now or can I add them in a later PR?

@InspiredGuy
Copy link
Contributor

@BobDotCom the build now fails due to linter errors, please take a look. We would prefer tests to be added to this PR, but your mode seems to just inherit the TextMode and not add any new behaviours so it should be fine as is. I would only ask to generate tokens for highlight rules test - see https://github.com/ajaxorg/ace/blob/master/src/mode/_test/Readme.md.

@BobDotCom
Copy link
Contributor Author

@InspiredGuy I fixed those linter errors and generated the tokens, does that look good?

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (7a6b83e) 87.41% compared to head (1d253c1) 87.47%.
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5342      +/-   ##
==========================================
+ Coverage   87.41%   87.47%   +0.06%     
==========================================
  Files         574      579       +5     
  Lines       45613    45877     +264     
  Branches     6935     6954      +19     
==========================================
+ Hits        39873    40133     +260     
- Misses       5740     5744       +4     
Flag Coverage Δ
unittests 87.47% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/mode/nasal.js 100.00% <100.00%> (ø)
src/mode/nasal_highlight_rules.js 100.00% <100.00%> (ø)

... and 15 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@InspiredGuy
Copy link
Contributor

Looks good @BobDotCom , thank you

@InspiredGuy InspiredGuy merged commit 4fff99e into ajaxorg:master Oct 16, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants