1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00
Commit Graph

26509 Commits

Author SHA1 Message Date
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
joshvera
519a6db035 Implement Return
impements Return in terms of eval and earlyReturn now that eval returns a ValueRef

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:59:25 -05:00
Timothy Clem
1d23968c53 Fix tests 2018-11-13 14:59:20 -08:00
joshvera
12a038869a Export Heap and Frame accessors
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:58:49 -05:00
joshvera
1f09735902 Add insertFrameLink
in order to add frames that are reachable from the current frame

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:58:37 -05:00
joshvera
0a35a5eee7 Add bindFrames to merge heap frames for now
This may not be an ideal solution but populates the current heap with enough information to traverse frames to correct slots

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:58:06 -05:00
Timothy Clem
630566f956 No need for extra details here, this data is already around in error responses 2018-11-13 14:36:03 -08:00
Timothy Clem
492117d796 Actually use the HTTP_TIMEOUT config var 2018-11-13 14:30:25 -08:00
joshvera
fb5e4400a1 modify test files
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:09:20 -05:00
joshvera
ddb9b31a09 Add imports functions test
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:09:13 -05:00
joshvera
56b85b1070 Don't construct intermediate current scope in QualifedExport eval
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:09:05 -05:00
joshvera
567fe790c9 Construct an import reference from correct start scope
Construct an import reference starting from the currentAddress of the target scope graph

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