Giter Club home page Giter Club logo

brian-code-editor's People

Contributors

abhishektiwari23 avatar bdevans avatar mstimberg avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

bdevans navnav123

brian-code-editor's Issues

More consistency with Python's scopes

I think it would be best if we'd follow Python's scopes as much as possible. E.g. we should also use the following names (replacing python by brian each time):

  • comment.line.number-sign.python for # comments
  • punctuation.parenthesis.begin.python and ...end.python for parentheses (I think we'll need to deal with this for completion, anyway)
  • keyword.operator.arithmetic.python for operators such as +, *, or ** (again, can be copy&pasted from Python probably)

Fix some details for constants vs. variables

On the right-hand side of an equation, some of the names will correspond to variables and some to constants, but we cannot know which is which in a TextMate grammar (this needs "semantic highlighting"). For now, I'd therefore mark all names (e.g. in the example gl, El, v, โ€ฆ) as constants.

Also note that we do not need special handling for names that only have one letter (currently constant.character.brian) โ€“ these should be handled in the same way as multi-letter names.

Clarify flags and unit definition

The part following the colon (:) of an equation defines a unit (e.g. volt, but possible also something like 1/second, optionally followed by one or more comma-separated flags in parentheses. E.g.

... : siemens  # no flag
... : volt (constant)  # 1 flag
... : 1/second (shared, constant)  # 2 flags

We should mark the two parts differently

Highlight function calls

In the example, there are function calls like exp(...) or exprel(...), these should be marked as meta.function-call.brian. This could probably be taken from Python's grammar (or more or less any other programming language)?

Extend features to `NeuronGroup` and `Synapses` definitions

Currently, highlighting/completion/verification are only done in Equations definitions. Without much additional work, we could also extend this to NeuronGroup and Synapses, when they directly define equations as their model argument.

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.