1
1
mirror of https://github.com/github/semantic.git synced 2024-12-16 10:38:26 +03:00
Commit Graph

26586 Commits

Author SHA1 Message Date
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
joshvera
4aac61ea70 Insert a list of scope if label doesn't exist in edge map of target scope
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:08:06 -05:00
joshvera
24720f9f06 Look within references when constructing paths
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:07:38 -05:00
Timothy Clem
2e1626d949 Make symbols output also return partial results 2018-11-13 11:02:23 -08:00
Timothy Clem
4fbeaef355 Attempt to send stack traces to haystack 2018-11-13 10:09:58 -08:00
joshvera
eb54f7743f add some heap tests 2018-11-13 12:17:52 -05:00
joshvera
1cb513e441 bind scope graphs in side effect imports without constructing an edge
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 12:06:44 -05:00
joshvera
71a73150c9 Ensure we can't look up baz from side effect imports 2018-11-13 12:06:22 -05:00
joshvera
4fed5eb1e7 export baz in a.ts 2018-11-13 12:06:05 -05:00
Timothy Clem
890f6d2068 Return partial results for json diffs too 2018-11-10 09:40:39 -08:00
Timothy Clem
d33b4a5f3d Better error structure for Tocs 2018-11-10 09:40:29 -08:00
Timothy Clem
09e6046763 Be consistent with other responses 2018-11-10 09:40:19 -08:00
Timothy Clem
bc9f85fdef Catch errors for some diff outputs 2018-11-09 16:44:10 -08:00
Timothy Clem
259479ad62 Merge pull request #2260 from github/stat-errors-once-per-path
Only stat errors once per path
2018-11-09 13:53:38 -08:00
Timothy Clem
b964324d09 Only stat errors once per path 2018-11-09 13:18:46 -08:00
Timothy Clem
37b2ddbd14 Merge pull request #2257 from github/streamline-toc-summaries
Streamline declarations for toc summaries
2018-11-09 13:18:32 -08:00
Rick Winfrey
9d54e063ac First real passing test 🎉
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:48:11 -08:00
Rick Winfrey
1e88378a51 Return an Rval representing the function body as a closure, instead of returning a Heap address
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:47:44 -08:00
Rick Winfrey
12d27b436c Update an existing function declaration scope
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:47:24 -08:00
Rick Winfrey
21a9e29b0c bindAll after evaluating a sideEffectImport
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:46:52 -08:00
Rick Winfrey
7103ba94b7 Declare a function using its name and the full span of the function
⚠️ this is a hack to get around the problem of evaluating a functionName (term) in order to retrieve its Span to properly declare the function.

Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:46:14 -08:00
Rick Winfrey
d020f71862 Set currentScope and currentFrame after running an initial action
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:43:35 -08:00
Rick Winfrey
cbafcd8114 Add (Show address) for debugging
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:42:43 -08:00
joshvera
f9c6590f61 Remove baz export
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 13:05:48 -05:00