Commit Graph

9644 Commits

Author SHA1 Message Date
Tim Schaub
6d0badcf2a Optional scope (works for expressions without identifiers) 2013-06-25 12:11:46 -06:00
Tim Schaub
d920d8e578 Test left-hand-side expression parsing 2013-06-25 12:11:46 -06:00
Tim Schaub
13d0b8b084 Provide ol.expression.parse method
This is the only method needed in the API.
2013-06-25 12:11:46 -06:00
Tim Schaub
3643ea164f Cast boolean and null before creating literal expression 2013-06-25 12:11:46 -06:00
Tim Schaub
ce67aa2617 Make way for convenience functions in ol.expression package 2013-06-25 12:11:45 -06:00
Tim Schaub
737d669e4a Correct types 2013-06-25 12:11:45 -06:00
Tim Schaub
7a1e69e288 Initial parsing tests 2013-06-25 12:11:45 -06:00
Tim Schaub
cb9725bdfb Provide static method to check for valid operators 2013-06-25 12:11:45 -06:00
Tim Schaub
29b77a2dac Member expressions 2013-06-25 12:11:45 -06:00
Tim Schaub
fbb028e15e Call expressions 2013-06-25 12:11:45 -06:00
Tim Schaub
2f7e74ab35 Create binary expressions when parsing 2013-06-25 12:11:45 -06:00
Tim Schaub
f050546fe2 Logical expressions 2013-06-25 12:11:44 -06:00
Tim Schaub
153df45f95 Math expressions
Just simple binary type expressions supported here.  These can be serialized in a variety of formats.  More complex operations to be supported by call expressions.
2013-06-25 12:11:44 -06:00
Tim Schaub
b2ff793ea1 Comparison expressions 2013-06-25 12:11:44 -06:00
Tim Schaub
c4867bafec Smaller subset of binary operators 2013-06-25 12:11:44 -06:00
Tim Schaub
7800e9b0cc Comments, links, copyrights 2013-06-25 12:11:44 -06:00
Tim Schaub
052b973b39 Reduce to a single literal 2013-06-25 12:11:44 -06:00
Tim Schaub
20b66fc447 Proper specs 2013-06-25 12:11:43 -06:00
Tim Schaub
0abcbb9854 Stray not 2013-06-25 12:11:43 -06:00
Tim Schaub
ed2e21dffa Parsing 2013-06-25 12:11:43 -06:00
Tim Schaub
1f68522837 Utility methods on the lexer 2013-06-25 12:11:43 -06:00
Tim Schaub
a87ebfe97b Specific expression types 2013-06-25 12:11:43 -06:00
Tim Schaub
d7e0d043f3 Consistently number 2013-06-25 12:11:43 -06:00
Tim Schaub
063b461ffd Fewer calls to charCodeAt 2013-06-25 12:11:43 -06:00
Tim Schaub
9edc9ebcc5 Use next instead 2013-06-25 12:11:42 -06:00
Tim Schaub
f272350e00 Expose next and peek methods 2013-06-25 12:11:42 -06:00
Tim Schaub
5baa38b82c Test punctuator scanning 2013-06-25 12:11:42 -06:00
Tim Schaub
957b6db3d7 Skip whitespace 2013-06-25 12:11:42 -06:00
Tim Schaub
50f94911b1 Scan string literals 2013-06-25 12:11:42 -06:00
Tim Schaub
4d62cea700 Escape sequences in our identifiers have already been handled 2013-06-25 12:11:42 -06:00
Tim Schaub
0844df8cc2 Scanning identifiers
This includes code that is likely not necessary.  The escape sequence scanning will likely not be used in our case, but I'm committing it here so it can be brought back if needed later.
2013-06-25 12:11:42 -06:00
Tim Schaub
a748665646 Space and comment 2013-06-25 12:11:42 -06:00
Tim Schaub
040c80a5ad Expectations about token type 2013-06-25 12:11:42 -06:00
Tim Schaub
193cf4de50 Scan numeric literals 2013-06-25 12:11:41 -06:00
Tim Schaub
81b344715a Renaming for clarity 2013-06-25 12:11:41 -06:00
Tim Schaub
a5343161bf Separate lexer 2013-06-25 12:11:41 -06:00
Tim Schaub
84a9fb40ef More char code tests 2013-06-25 12:11:41 -06:00
Tim Schaub
88fd0fda64 Initial bits for parser 2013-06-25 12:11:41 -06:00
Tom Payne
ca3e1f0843 Merge pull request #819 from twpayne/fix-819
Drag rotate and zoom example is broken
2013-06-25 08:07:03 -07:00
Tim Schaub
40b10c13dc Merge pull request #802 from tschaub/802-multilinstring-typo
Multiline strings are not rendered correctly due to typo in VectorLayer
2013-06-25 07:33:08 -07:00
Tom Payne
23e54e4543 Stop other interactions when dragging 2013-06-25 15:46:00 +02:00
Tom Payne
38893eaf8c Merge pull request #818 from twpayne/view2d-properties
View2D properties
2013-06-25 04:50:30 -07:00
Tom Payne
fab12b10c1 Handle projection being undefined in getView2DState 2013-06-25 12:26:35 +02:00
Tom Payne
f462adbe53 Set default View2D rotation in constructor and getView2DState instead of in getRotation 2013-06-25 12:19:30 +02:00
Tom Payne
e5d6ccd6ba Use getView2DState instead of getResolution/getRotation in interactions 2013-06-25 12:18:31 +02:00
ahocevar
a427719a22 Merge pull request #816 from ahocevar/tilegrid-units
Use ol.Projection#getMetersPerUnit(). r=@tschaub
2013-06-24 16:05:56 -07:00
ahocevar
a14b21d80c Use ol.Projection#.getMetersPerUnit()
As a follow-up to #815, this change makes
ol.tilegrid.createForProjection work in cases where a Proj4
projection does not have units set. For better code readability,
a new variable is used when calculating the resolution.
2013-06-25 00:29:50 +02:00
Tim Schaub
d1eec80324 Merge pull request #815 from tschaub/override
Override for clarity
2013-06-24 14:38:26 -07:00
Tim Schaub
bb915cbf3d Less code
Since out meters per unit conversion table is a bit spare, prefer the configured conversion.
2013-06-24 12:27:36 -06:00
Tim Schaub
129e4d5704 Fix doc bug 2013-06-24 12:21:56 -06:00