コード例 #1
0
 public override bool Visit(AstArgumentsDefList node)
 {
     return true;
 }
コード例 #2
0
 public override bool Visit(AstArgumentsDefList node)
 {
     ErrorIfIsNull(node.ArgumentsDefinition);
     return true;
 }
コード例 #3
0
ファイル: nodes.cs プロジェクト: nikita-vanyasin/compiler
 public AstClassMethod(
     AstVisibilityModifier visibility,
     AstStaticModifier staticMod,
     AstIdExpression typeDef,
     AstIdExpression name,
     AstArgumentsDefList argumentsDefinition,
     AstStatementsBlock statementsBlock
 )
 {
     Visibility = visibility;
     Static = staticMod;
     TypeDef = typeDef;
     Name = name;
     ArgumentsDefinition = argumentsDefinition;
     StatementsBlock = statementsBlock;
 }
コード例 #4
0
        // #METHOD_ARGS LEFT_PAREN #ARGUMENTS_DEFINITION RIGHT_PAREN
        private void ConstructMethodArgs()
        {
            var argumentsDefList = new List<AstArgumentDef>();
            var curr = nodes.Peek() as AstNode;
            while (curr is AstArgumentDef)
            {
                nodes.Pop();
                argumentsDefList.Insert(0, curr as AstArgumentDef);
                curr = nodes.Peek() as AstNode;
            }

            var argsDefList = new AstArgumentsDefList(argumentsDefList);
            PushNode(argsDefList);
        }
コード例 #5
0
 // #METHOD_ARGS LEFT_PAREN RIGHT_PAREN
 private void ConstructEmptyMethodArgs()
 {
     var argsDefList = new AstArgumentsDefList(new List<AstArgumentDef>());
     PushNode(argsDefList);
 }
コード例 #6
0
 public override bool Visit(AstArgumentsDefList node)
 {
     codeStream.Write("(");
     variableCounter = new Dictionary<string, uint>();
     List<string> LLWMArgDefList = new List<string>();
     foreach(var argument in node.ArgumentsDefinition)
     {
         LLWMArgDefList.Add(GetLLVMType(argument.TypeDef.Id) + " %" + argument.Name.Id);
         variableCounter[argument.Name.Id] = 0;
     }
     codeStream.Write(string.Join(",", LLWMArgDefList.ToArray()));
     codeStream.Write("){\n");
     return false;
 }
コード例 #7
0
 public abstract bool Visit(AstArgumentsDefList node);