piotr-semenov / parigp-lang Goto Github PK
View Code? Open in Web Editor NEWTextmate language grammar for programming language of PARI/GP computer algebra system
License: MIT License
Textmate language grammar for programming language of PARI/GP computer algebra system
License: MIT License
The test below results into wrong syntax parsing. Checked against VSCode 1.89.0
by its built-in scope inspector. VSIX package was built with vsce of version 2.26.1
.
## SYNTAX TEST "source.parigp" "Functions"
v = ((y, z) -> y^2 + z^2)(10);
## ^ source.parigp meta.function.lambda.parigp meta.parens.parigp punctuation.section.parens.end.parigp
## ^ source.parigp meta.function.lambda.parigp meta.parens.parigp punctuation.section.parens.begin.parigp
\q
##^ source.parigp meta.function.lambda.parigp keyword.operator.arithmetic.parigp
## ^ source.parigp meta.function.lambda.parigp variable.parameter.function.parigp
As I discovered, if any grammar rule having begin
and end
keys has nested sub-rules, then it would start looking for end
pattern match only after all sub-rules were applied. That's why scope meta.function.lambda.parigp
doesn't end at ->
as it was expected in code.
FYI, this behavior is not described at TextMate's official documentation.
The test below results into wrong syntax parsing.
## SYNTAX TEST "source.parigp" "Operators"
# [1, 2, 3]
##^ source.parigp support.function.parigp
Symbol #
here stands for cardinality operator, not for meta-command.
Stable Channel, Build 4169
When adding parigp.tmLanguage into packages directory /path/to/Sublime Text 3/Packages/User/
, ST responds with error Unexpected capture value
in its Developer Console.
After investigation, I discovered some undocumented requirements for ST to accept tmLanguage PLIST containing TextMate language grammar. Please, find them below as path to fix.
repository
tags and nested patterns
for capture blocks.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.