[fine] Parse alternate types
This commit is contained in:
parent
f7acfd588d
commit
afa4812074
10 changed files with 73 additions and 26 deletions
|
|
@ -15,7 +15,8 @@ fun f3() {}
|
|||
// | Identifier:'"x"'
|
||||
// | Colon:'":"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Comma:'","'
|
||||
// | Error:'"Error at 'fun': expect ')' to end a parameter list"'
|
||||
// | FunctionDecl
|
||||
|
|
@ -27,7 +28,8 @@ fun f3() {}
|
|||
// | Identifier:'"x"'
|
||||
// | Colon:'":"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Comma:'","'
|
||||
// | Error
|
||||
// | Error:'"Error at ',': expected parameter"'
|
||||
|
|
@ -36,7 +38,8 @@ fun f3() {}
|
|||
// | Identifier:'"z"'
|
||||
// | Colon:'":"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | RightParen:'")"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ fun fib(n: f64) -> f64 {
|
|||
// | Identifier:'"f1"'
|
||||
// | Colon:'":"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Comma:'","'
|
||||
// | Error:'"Error at 'fun': expect ')' to end a parameter list"'
|
||||
// | FunctionDecl
|
||||
|
|
@ -27,12 +28,14 @@ fun fib(n: f64) -> f64 {
|
|||
// | Identifier:'"n"'
|
||||
// | Colon:'":"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | RightParen:'")"'
|
||||
// | ReturnType
|
||||
// | Arrow:'"->"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
// | ExpressionStatement
|
||||
|
|
|
|||
|
|
@ -20,12 +20,14 @@ fun test() -> f64 {
|
|||
// | Identifier:'"x"'
|
||||
// | Colon:'":"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | RightParen:'")"'
|
||||
// | ReturnType
|
||||
// | Arrow:'"->"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
// | ExpressionStatement
|
||||
|
|
@ -45,7 +47,8 @@ fun test() -> f64 {
|
|||
// | ReturnType
|
||||
// | Arrow:'"->"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
// | ExpressionStatement
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ fun test() -> f64 {
|
|||
// | ReturnType
|
||||
// | Arrow:'"->"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
// | ExpressionStatement
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ fun test() -> bool {
|
|||
// | ReturnType
|
||||
// | Arrow:'"->"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"bool"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"bool"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
// | ExpressionStatement
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ fun test() -> f64 {
|
|||
// | ReturnType
|
||||
// | Arrow:'"->"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
// | IfStatement
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ fun test() -> f64 {
|
|||
// | ReturnType
|
||||
// | Arrow:'"->"'
|
||||
// | TypeExpression
|
||||
// | Identifier:'"f64"'
|
||||
// | TypeIdentifier
|
||||
// | Identifier:'"f64"'
|
||||
// | Block
|
||||
// | LeftBrace:'"{"'
|
||||
// | ExpressionStatement
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue