Git Product home page Git Product logo

m2-vscode's People

Contributors

redstar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m2-vscode's Issues

Additional bracket when adding comment

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?

M2_comment-vscode

Best regards

Missing support for Modula-2 dialect tags

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/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.