.. update the editor to do some basic syntax
highlighting; literals in red, comments in
blue and so on.
.. next commit will focus on highlighting errors
with a wavy line and some form of error list.
.. updated the datafilter to handle general functions
and parse them without needing them declared in the lexer
.. makes it much easier to add new functions in the future
.. did this to add core math functions;
* sin, cos, tan, asin, acos, atan,
* sinh, cosh, tanh, asinh, acosh, atanh
* exp, log, log10, ceil, floor, round
* fabs, isinf, isnan
.. we can add more later; erf/gamma spring to mind !
.. uses the C/C++ notation:
expr ? expr2 : expr3
Where expr is the condition e.g. X>2
and expr2 is what to evaluate to if expr is true
and expr3 is what to evaluate to if expr is false
e.g.
(Workout_Code = "1L3") ? 1 : 0
Will evaluate as 1 for all workouts where the
workout code is 1L3 and 0 for all other workouts.
.. now will repeat completion beyond the very
first word on the line
.. needs to be enhanced to work when not at the
end of the text (i.e. cursor move)
.. resize event was checking menu icon, which was never
going to change due to a resize event.
.. it crashed during window exit since it dereferenced objects
that had been deleted.
.. for now, it crashes occasionally due to cross-thread
issues, and doesn't work across the text anyway.
will make it permanently associated by not active
when in search mode.
.. get rid of terrible cut and paste code, duplicating
eval for particular leafs
.. eval returns a Result() object which can be numeric
or textual (date strings are parsed to numeric)
.. can now add formulas to LTM as well as adding more
functions that may be useful (conditionals, maths
spring to mind first).
... removing tests,... from LIBKML build
... allowing building of base functionality of LIBKML on Windows with MinGW
... covering the LIBKML functional scope used by GoldenCheetah
.. NP > 200 && IF > 0.85 didn't work because the datafilter
grammar needed fixing up for precedence of the && and || operators.
.. this has been fixed by embedding into the grammar; binary expressions
and logical expressions are now declared individually.
.. the generated tree uses the same encoding so no changes required
to the code, just the grammar