redstar / m2-vscode Goto Github PK
View Code? Open in Web Editor NEWModula-2 syntax highlighting for Visual Studio Code
License: BSD 3-Clause "New" or "Revised" License
Modula-2 syntax highlighting for Visual Studio Code
License: BSD 3-Clause "New" or "Revised" License
Hi,
First of all...many thanks for the great extension.
I have a problem adding comments. If I open a parenthesis and then add an asterisk,
the close tag is automatically set for the comment, but probably a bracket to bracket tag is also automatically set for a bracket. Is there a way to solve this?
Best regards
There is a quasi-standard for dialect tags agreed among several compiler maintainers. Any newly developed syntax highlighting should aim to support this.
For example, the pygments syntax rendering framework for Python, Gaius Mulley's Emacs highlighting for Modula-2 and Benjamin Kowarsch's highlighting for vim support the tags.
A dialect tag is a special comment that indicates in which dialect the code has been written.
dialectTag :=
"(*!" dialectMnemonic ( "+" compilerMnemonic )? "*)"
;
A dialect mnemonic indicates the dialect
dialectMnemonic :=
"m2pim" /* for PIM */
| "m2iso" /* for ISO */
| "m2r10" /* for R10 */
| ...
;
An optional compiler mnemonic indicates language extensions of a specific compiler.
compilerMnemonic :=
"ack" | "gm2" | "mocka" | "p1" | ...
;
No whitespace is permitted.
At the very least the dialect mnemonics for PIM, ISO and R10 should be supported.
A dialect tag is placed ideally before or directly after the module header in a Modula-2 source file. The highlighting script should scan for the first occurrence of such a tag within the first 100-200 lines of source (accounting for a copyright header that may occur at the top).
If a tag is found, the highlighting script should render the source code according to the dialect indicated by the dialect tag. Otherwise it may use a default setting. A more sophisticated script could search for a keyword that is unique in only one dialect, but this is not really necessary since people who want their source files to be rendered properly will soon learn to add dialect tags to all their sources.
For more details, see the Modula-2 documentation for pygments at:
https://www.pydoc.io/pypi/Pygments-2.1.3/autoapi/modula2/index.html
and the Modula-2 support package for Vim at:
https://bitbucket.org/trijezdci/m2syntaxcolour/src/default/Vim/
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.