-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from vein-lang/feature/generic-and-type-alias…
…es-imrovements [methods aliases] Features for Function Type and load function as argument
- Loading branch information
Showing
25 changed files
with
517 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
namespace vein.syntax | ||
{ | ||
using System.Collections.Generic; | ||
using Sprache; | ||
namespace vein.syntax; | ||
|
||
public class ReturnStatementSyntax : StatementSyntax, IPositionAware<ReturnStatementSyntax> | ||
{ | ||
public ReturnStatementSyntax(ExpressionSyntax e) => Expression = e; | ||
public override SyntaxType Kind => SyntaxType.ReturnStatement; | ||
using System.Collections.Generic; | ||
using Sprache; | ||
|
||
public override IEnumerable<BaseSyntax> ChildNodes => GetNodes(Expression); | ||
public class ReturnStatementSyntax(ExpressionSyntax e) : StatementSyntax, IPositionAware<ReturnStatementSyntax> | ||
{ | ||
public override SyntaxType Kind => SyntaxType.ReturnStatement; | ||
|
||
public ExpressionSyntax Expression { get; set; } | ||
public override IEnumerable<BaseSyntax> ChildNodes => GetNodes(Expression); | ||
|
||
public new ReturnStatementSyntax SetPos(Position startPos, int length) | ||
{ | ||
base.SetPos(startPos, length); | ||
return this; | ||
} | ||
public ExpressionSyntax Expression { get; set; } = e; | ||
|
||
public new ReturnStatementSyntax SetPos(Position startPos, int length) | ||
{ | ||
base.SetPos(startPos, length); | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.