Olivier Guyot
fc98704bcb
Expressions / adds a test for a complex combination of operators
2019-10-25 14:55:44 +02:00
Olivier Guyot
27c530ec64
Expressions / introduce the match operator
...
This operator allows mapping from input values to output values of different
kinds and handles variable arguments count.
2019-10-25 14:55:44 +02:00
Olivier Guyot
e3f7d29bb2
Expressions / add utilities for using strings in GLSL & more type checking
...
It is now possible to specify a type hint when parsing an expression, which
helps determine the output value type.
When no single output type can be inferred, an error is thrown.
For strings, every literal value will be replaced by a number and a map of
these associations will be kept in the parsing context, which is passed
recursively.
2019-10-25 14:55:44 +02:00
Olivier Guyot
5712792772
Expressions / add more tests for conversion to GLSL
2019-10-25 14:55:44 +02:00
Olivier Guyot
bcf7649b9a
Expressions / store the variables & attributes in the context
2019-10-25 14:55:44 +02:00
Olivier Guyot
7e4119d580
Expressions / restored the parsing logic with better type checking
...
Converting expressions to GLSL is now done in ol/style/expressions, with the
same logic as before in ol/webgl/ShaderBuilder.
2019-10-25 14:55:44 +02:00
Olivier Guyot
72903d6454
Expressions / added operator declarations & type checking logic
2019-10-25 14:55:44 +02:00
Olivier Guyot
35af80b433
Style / add an ol/style/expressions module
...
This module will contain the utilities and operator declarations
for literal style expressions, boh for type checking and parsing
2019-10-25 14:55:44 +02:00