1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00
Commit Graph

26620 Commits

Author SHA1 Message Date
joshvera
de126c7b94 qualify object 2018-11-16 16:11:28 -05:00
joshvera
781df71d37 catch the rest of EvalError 2018-11-16 16:11:18 -05:00
joshvera
ec8733889e Add AbstractHole instance to ValueRef 2018-11-16 16:10:02 -05:00
joshvera
e54cc8b096 Add QualifedImportError 2018-11-16 16:09:42 -05:00
joshvera
f39da9578a Move ImportPath to Data.ImportPath 2018-11-16 16:09:11 -05:00
joshvera
ea5587d16c Implement Evaluatable for MemberAccess 2018-11-15 20:24:34 -05:00
joshvera
39e723b980 Add Object to concrete Value 2018-11-15 20:24:21 -05:00
joshvera
3de1cbce5b Change scopedEnvironment to return the address of an Object 2018-11-15 20:24:06 -05:00
joshvera
994fd861c5 Add ReferenceError 2018-11-15 20:23:43 -05:00
joshvera
ea7a576c31 fix imports with aliased symbols test 2018-11-15 19:45:24 -05:00
joshvera
64786d30f9 Declaration positions are 0 indexed 2018-11-15 19:35:46 -05:00
joshvera
d7db6d3cbc docs 2018-11-15 19:30:59 -05:00
joshvera
77fd2e823d Add insertDeclarationSpan to ScopeGraph 2018-11-15 19:29:09 -05:00
joshvera
5c82345816 Add putDeclarationSpan to ScopeGraph 2018-11-15 19:29:01 -05:00
joshvera
6a34826abd Declare variable declarations with an empty span and update after evaluating 2018-11-15 19:28:48 -05:00
joshvera
39d874d9c6 Catch LookupDeclarationScopeError to a hole 2018-11-15 19:28:18 -05:00
joshvera
2f32fd6f2b fix empty heap test 2018-11-15 18:44:47 -05:00
Rick Winfrey
46d39a25c8 A lot of warnings. ALOT 2018-11-15 15:04:28 -08:00
Rick Winfrey
4a5c4deb38 Add StatementBlock Taggable instance 2018-11-15 15:03:37 -08:00
Rick Winfrey
97545f0ae7 Remove redundant constraints and imports 2018-11-15 14:18:36 -08:00
Rick Winfrey
e08b1100e4 Remove unnecessary (now) scopeAddress parameter
In Data.Abstract.ScopeGraph when we invoke `insertImportReference`, we make the assumption that the starting scope with respect to the currently available ScopeGraph is the `currentScope`. We then start from that scope to begin constructing a Path to the scope containing the target declaration.

Control.Abstract.ScopeGraph will need the scopeAddress parameter still, because it is going to insert a new scope into our scope graph using the scope returned from Data.Abstract.ScopeGraph (with the newly constructed path to the declaration).
2018-11-15 13:58:28 -08:00
Rick Winfrey
f7c38b0bb7 Clean up unused params 2018-11-15 13:52:14 -08:00
Rick Winfrey
a94760e99a Placeholder for handling Hole Paths 2018-11-15 13:51:57 -08:00
Rick Winfrey
66d3044951 Merge branch 'master' into heap-frames 2018-11-15 13:44:06 -08:00
joshvera
78d543c60f Return the currentScope' if pathDeclarationScope is a DPath
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 14:39:59 -05:00
joshvera
393da1897b Test position of slots
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 14:39:41 -05:00
joshvera
b0966e0e3b valueRef should be a Unit 2018-11-15 13:32:58 -05:00
joshvera
4769c2cb24 regenerate javascript fixtures
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 13:27:37 -05:00
joshvera
5c4dde8d54 fix up test fixtures
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 13:24:46 -05:00
joshvera
80f7c6585d Fix up tests
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 13:17:22 -05:00
joshvera
c7040f6131 fix test type errors
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:46:30 -05:00
joshvera
dba7f17d48 spoke too soon
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:20:35 -05:00
joshvera
680681f944 fix up EvalError in tests
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:19:42 -05:00
joshvera
8a4aa24889 Add a function call example
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:18:52 -05:00
joshvera
0cfd04905a Add Evaluatable instance for RequiredParameter
Declares the name of the param in the scope graph and assigns the Rval's associated scope to the lval's declaration and the rval's value to the lval's slot.

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:17:42 -05:00
joshvera
22e1822185 Defer declaring names in the scope graph to param
Parameter syntax evaluatable instances are now responsible for adding declarations to the scope graph.

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:16:26 -05:00
joshvera
b0d0e2706b Add putSlotDeclarationScope
so we can set the associated scope of a slot

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:15:39 -05:00
joshvera
5c861f412f Add putDeclarationScopeAtPosition
So we can set the associated scope for the declaration of a slot

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:14:58 -05:00
joshvera
fe30b926f7 EvalError types
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:14:31 -05:00
joshvera
127552dbfc parameterize EvalError by address and value
so that we can throw AssignmentRvalError within Assignment or RequiredParameter Evaluatable instances

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:14:02 -05:00
joshvera
3223c97548 Add non-lexical StatementBlock
to differentiate between syntax that creates a new lexical scope and function bodies etc.

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:13:22 -05:00
joshvera
c0be5b6da2 Remove Assignment from RequiredParameter
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 18:57:31 -05:00
joshvera
b690585a78 Add statementTerm for lexical blocks
Change statementBlock to construct non-lexical syntax blocks

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 18:57:15 -05:00
Timothy Clem
54b8f5248b Merge pull request #2262 from github/diff-errors
Return partial diff results with better error handling
2018-11-14 14:08:29 -08:00
joshvera
3f4c5d961d Create a lexical edge to its parent's declaration frame when calling a closure 2018-11-14 15:15:31 -05:00
joshvera
eebae6a1fc Add pathDeclarationScope 2018-11-14 15:14:58 -05:00
joshvera
4c2716f817 Add lookupDeclarationFrame 2018-11-14 15:14:50 -05:00
joshvera
6877ef1a5e Add lookupDeclarationScope 2018-11-14 15:14:43 -05:00
Timothy Clem
7c3469b86e Get the math right! 2018-11-13 15:50:07 -08:00
joshvera
4da5b012da Construct a frame for the intermediate import scope
So we can look up declarations across heap boundaries

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 18:00:00 -05:00