Skip to content

Commit

Permalink
TypeArguments in function application
Browse files Browse the repository at this point in the history
  • Loading branch information
STRd6 committed Dec 17, 2022
1 parent 8941b63 commit 80eec90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ nodes.coffee
- 4965 leading space before `.` access
- 6007 function application, nested inside if expression, nested inside array

GitHub Pages www -> apex domain
---
https://stackoverflow.com/questions/54817253/github-pages-https-www-redirect

Timesheet
---

Expand Down Expand Up @@ -505,5 +509,6 @@ Timesheet
2022-12-14 | 2.00 | PRs;
2022-12-15 | 3.00 | PRs; GH Issues;
2022-12-16 | 1.50 | civet.dev; gh pages; PR
2022-12-17 | 0.50 | PRs; TypeArguments in function application

Semantic token provider: use {token, $loc} objects annotated with a semantic tag
2 changes: 1 addition & 1 deletion source/parser.hera
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Arguments
return [open, module.insertTrimmingSpace(ws, ""), args, close]

ExplicitArguments
OpenParen ArgumentList? ( __ Comma )? __ CloseParen
TypeArguments? OpenParen ArgumentList? ( __ Comma )? __ CloseParen

# Start of function application, inserts an open parenthesis, maintains spacing and comments when possible
ApplicationStart
Expand Down
9 changes: 9 additions & 0 deletions test/types/function.civet
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,12 @@ describe "[TS] function", ->
---
declare function $C<T extends any[]>(...terms: { [I in keyof T]: Parser<T[I]> }): Parser<T[number]>
"""

describe "application", ->
testCase """
type arguments
---
x<T>()
---
x<T>()
"""

0 comments on commit 80eec90

Please sign in to comment.