Kappa-Dev / KappaTools

Tool suite for kappa models. Documentation and binaries can be found in the release section. Try it online at
http://kappalanguage.org/
GNU Lesser General Public License v3.0
112 stars 41 forks source link

Consistency in variable highlighting in the UI #448

Open hmedina opened 7 years ago

hmedina commented 7 years ago

Variables are expected to be highlighted by the UI, normally appearing in a shade of electric blue. However, this only applies if the variable is declared using quote marks. Variables declared without these, even though perfectly valid for KaSim, are not highlighted as variables. For example:

%var: Foo 1
%var: 'Baz' 2

Is displayed as: capture

Considering that inputs.ka files tend to strip variable names of their user-given flanking quotes if they don't contain certain characters (e.g. |), this highlighting inconsistency becomes rampant.

pirbo commented 7 years ago

Super expensive because context dependent!

For now the UI highlights stuff between '' wherever they are. We'd need to add the ability to highlight a word ONLY in algebraic expression! Not impossible but implies to make js/Kappa.js way way ... way smarter.