public NativeFunctionDeclarationSyntax(TokenNode constantNode, TokenNode nativeNode, FunctionDeclarationSyntax functionDeclarationNode)
     : base(constantNode, nativeNode, functionDeclarationNode)
 {
     _constant = constantNode ?? throw new ArgumentNullException(nameof(constantNode));
     _native   = nativeNode ?? throw new ArgumentNullException(nameof(nativeNode));
     _declr    = functionDeclarationNode ?? throw new ArgumentNullException(nameof(functionDeclarationNode));
 }
 public NativeFunctionDeclarationSyntax(EmptyNode emptyNode, TokenNode nativeNode, FunctionDeclarationSyntax functionDeclarationNode)
     : base(emptyNode, nativeNode, functionDeclarationNode)
 {
     _empty  = emptyNode ?? throw new ArgumentNullException(nameof(emptyNode));
     _native = nativeNode ?? throw new ArgumentNullException(nameof(nativeNode));
     _declr  = functionDeclarationNode ?? throw new ArgumentNullException(nameof(functionDeclarationNode));
 }
Ejemplo n.º 3
0
 public FunctionSyntax(EmptyNode emptyNode, TokenNode functionNode, FunctionDeclarationSyntax declarationNode, LineDelimiterSyntax eolNode1, LocalVariableListSyntax localVariableListNode, StatementListSyntax statementListNode, TokenNode endfunctionNode, LineDelimiterSyntax eolNode2)
     : base(emptyNode, functionNode, declarationNode, eolNode1, localVariableListNode, statementListNode, endfunctionNode, eolNode2)
 {
     _empty       = emptyNode ?? throw new ArgumentNullException(nameof(emptyNode));
     _function    = functionNode ?? throw new ArgumentNullException(nameof(functionNode));
     _declr       = declarationNode ?? throw new ArgumentNullException(nameof(declarationNode));
     _eol1        = eolNode1 ?? throw new ArgumentNullException(nameof(eolNode1));
     _locals      = localVariableListNode ?? throw new ArgumentNullException(nameof(localVariableListNode));
     _statements  = statementListNode ?? throw new ArgumentNullException(nameof(statementListNode));
     _endfunction = endfunctionNode ?? throw new ArgumentNullException(nameof(endfunctionNode));
     _eol2        = eolNode2 ?? throw new ArgumentNullException(nameof(eolNode2));
 }
Ejemplo n.º 4
0
 public static FunctionSyntax Function(FunctionDeclarationSyntax functionDeclaration, LocalVariableListSyntax locals, params NewStatementSyntax[] statements)
 {
     return(new FunctionSyntax(
                new EmptyNode(0),
                new TokenNode(new SyntaxToken(SyntaxTokenType.FunctionKeyword), 0),
                functionDeclaration,
                new LineDelimiterSyntax(new EndOfLineSyntax(new TokenNode(new SyntaxToken(SyntaxTokenType.NewlineSymbol), 0))),
                locals,
                new StatementListSyntax(statements),
                new TokenNode(new SyntaxToken(SyntaxTokenType.EndfunctionKeyword), 0),
                new LineDelimiterSyntax(new EndOfLineSyntax(new TokenNode(new SyntaxToken(SyntaxTokenType.NewlineSymbol), 0)))));
 }
Ejemplo n.º 5
0
 public static FunctionSyntax Function(FunctionDeclarationSyntax functionDeclaration, IEnumerable <LocalVariableDeclarationSyntax> localDeclarations, IEnumerable <NewStatementSyntax> statements)
 {
     return(Function(functionDeclaration, LocalVariableList(localDeclarations.ToArray()), statements.ToArray()));
 }
Ejemplo n.º 6
0
 public static FunctionSyntax Function(FunctionDeclarationSyntax functionDeclaration, IEnumerable <NewStatementSyntax> statements)
 {
     return(Function(functionDeclaration, statements.ToArray()));
 }
Ejemplo n.º 7
0
 public static FunctionSyntax Function(FunctionDeclarationSyntax functionDeclaration, IEnumerable <LocalVariableDeclarationSyntax> localDeclarations, IEnumerable <NewStatementSyntax> statements)
 {
     throw new NotImplementedException();
 }