Exemplo n.º 1
0
 public FieldDeclaration(string name, Expression defaultValue, TokenPosition position)
     : base(position)
 {
     SetName(name);
     this.defaultValue = defaultValue;
     this.variable = null;
 }
Exemplo n.º 2
0
 public MakeReference(Expression referencedType, ReferenceFlow flow, bool streamRef, TokenPosition position)
     : base(position)
 {
     this.referencedType = referencedType;
     this.flow = flow;
     this.streamReference = streamRef;
 }
Exemplo n.º 3
0
 public CaseLabel(Expression constant, AstNode children, TokenPosition position)
     : base(position)
 {
     this.constant = constant;
     this.children = children;
     this.block = null;
 }
Exemplo n.º 4
0
 public IsExpression(Expression value, Expression compare, TokenPosition position)
     : base(position)
 {
     this.value = value;
     this.compare = compare;
     this.targetType = null;
 }
Exemplo n.º 5
0
 public ConstructorInitializer(bool baseCall, AstNode arguments, TokenPosition position)
     : base(position)
 {
     this.baseCall = baseCall;
     this.arguments = arguments;
     this.ctorGroup = null;
 }
Exemplo n.º 6
0
 public GenericSignature(GenericParameter parameters, GenericConstraint constraints,
                          TokenPosition position)
     : base(position)
 {
     this.parameters = parameters;
     this.constraints = constraints;
 }
Exemplo n.º 7
0
 public GenericParameter(string name, TokenPosition position)
     : base(position)
 {
     SetName(name);
     this.isValueType = false;
     this.bases = null;
 }
Exemplo n.º 8
0
 public MakeArray(Expression valueType, int dimensions, TokenPosition position)
     : base(position)
 {
     this.valueType = valueType;
     this.dimensions = dimensions;
     this.isReadOnly = false;
 }
Exemplo n.º 9
0
 public AssignmentExpression(Expression variable, Expression value, TokenPosition position)
     : base(position)
 {
     this.variable = variable;
     this.value = value;
     this.delayedCoercion = false;
 }
Exemplo n.º 10
0
 public IndirectAccess(Expression basePointer, string name, TokenPosition position)
     : base(position)
 {
     SetName(name);
     this.basePointer = basePointer;
     this.slot = -1;
 }
Exemplo n.º 11
0
        public LocalVariablesDeclaration(Expression type, VariableDeclaration variables,
		                                  TokenPosition position)
            : base(position)
        {
            this.type = type;
            this.variables = variables;
        }
Exemplo n.º 12
0
 public FixedVariableDecl(string name, Expression value, TokenPosition position)
     : base(position)
 {
     SetName(name);
     this.value = value;
     this.variable = null;
 }
Exemplo n.º 13
0
 public MemberAccess(Expression reference, string name, TokenPosition position)
     : base(position)
 {
     SetName(name);
     this.reference = reference;
     this.slot = -1;
 }
Exemplo n.º 14
0
 public MakeFunctionPointer(Expression returnType, AstNode arguments, MemberFlags flags, TokenPosition position)
     : base(position)
 {
     this.returnType = returnType;
     this.arguments = arguments;
     this.flags = flags;
 }
Exemplo n.º 15
0
        public override Token CreateToken(string tokenstr, TokenPosition pos)
        {
            Token retval = base.CreateToken (tokenstr, pos);
            Boolean keyword_found = false;

            foreach(string str in KeywordList)
            {
                if (KeywordsCheckCase == true)
                {
                    if (str.ToUpper() == tokenstr.ToUpper())
                     keyword_found = true;
                }
                else if (str == tokenstr)
                {
                    keyword_found = true;
                }

                if (keyword_found == true)
                {
                    retval.Type = FECT.TokenTypes.Find(KeywordTokenID);
                    break;
                }
            }

            return(retval);
        }
Exemplo n.º 16
0
        public VariableDeclaration(string name, Expression initialValue,
		                            TokenPosition position)
            : base(position)
        {
            SetName(name);
            this.initialValue = initialValue;
        }
Exemplo n.º 17
0
 public ClassDefinition(MemberFlags flags, string name,
                        GenericSignature genericSignature,
                        AstNode bases, AstNode children, TokenPosition position)
     : base(flags, name, genericSignature,
            bases, children, position)
 {
 }
Exemplo n.º 18
0
 public SubscriptAccess(Expression array, Expression index, TokenPosition position)
     : base(position)
 {
     this.array = array;
     this.index = index;
     this.indexCoercions = null;
 }
Exemplo n.º 19
0
 public SwitchStatement(Expression constant, AstNode cases, TokenPosition position)
     : base(position)
 {
     this.constant = constant;
     this.cases = cases;
     this.defaultCase = null;
     this.caseDictionary = new Dictionary<ConstantValue, CaseLabel> ();
 }
Exemplo n.º 20
0
        public FieldDefinition(MemberFlags flags, Expression typeNode,
		                        FieldDeclaration declarations, TokenPosition position)
            : base(position)
        {
            this.flags = flags;
            this.typeNode = typeNode;
            this.declarations = declarations;
        }
Exemplo n.º 21
0
        public ForStatement(AstNode decls, Expression cond, AstNode incr, AstNode job,
		                     TokenPosition position)
            : base(job, position)
        {
            this.decls = decls;
            this.cond = cond;
            this.incr = incr;
        }
Exemplo n.º 22
0
 public TernaryOperation(Expression cond, Expression left, Expression right,
                         TokenPosition position)
     : base(position)
 {
     this.cond = cond;
     this.left = left;
     this.right = right;
 }
Exemplo n.º 23
0
 public FunctionArgument(Expression typeExpression, bool @params, string name, TokenPosition position)
     : base(position)
 {
     SetName(name);
     this.typeExpression = typeExpression;
     this.@params = @params;
     this.variable = null;
 }
Exemplo n.º 24
0
 public TryStatement(AstNode tryStatement, AstNode catchList,
                      AstNode finallyStatement, TokenPosition position)
     : base(position)
 {
     this.tryStatement = tryStatement;
     this.catchList = catchList;
     this.finallyStatement = finallyStatement;
 }
Exemplo n.º 25
0
 public AttributeInstance(Expression attributeExpr, AttributeArgument arguments,
                           TokenPosition position)
     : base(position)
 {
     this.attributeExpr = attributeExpr;
     this.arguments = arguments;
     this.attributeClass = null;
 }
Exemplo n.º 26
0
 public EnumDefinition(MemberFlags flags, string name, AstNode children,
     Expression typeExpr, TokenPosition position)
     : base(children, position)
 {
     SetName(name);
     this.flags = flags;
     this.typeExpr = typeExpr;
 }
Exemplo n.º 27
0
 public NewExpression(Expression typeExpression, Expression arguments, TokenPosition position)
     : base(position)
 {
     this.typeExpression = typeExpression;
     this.arguments = arguments;
     this.constructor = null;
     this.objectType = null;
 }
Exemplo n.º 28
0
 public FunctionPrototype(MemberFlags flags, Expression returnType,
                        FunctionArgument arguments, Expression nameExpression,
                           GenericSignature genericSignature,
                           TokenPosition position)
     : this(flags, returnType, arguments, "", genericSignature, position)
 {
     this.nameExpression = nameExpression;
 }
Exemplo n.º 29
0
 public ForEachStatement(Expression typeExpression, string name, Expression container,
         AstNode children, TokenPosition position)
     : base(children, position)
 {
     SetName(name);
     this.typeExpression = typeExpression;
     this.container = container;
 }
Exemplo n.º 30
0
 public AttributeArgument(Expression value, string name, TokenPosition position)
     : base(position)
 {
     SetName(name);
     this.value = value;
     this.property = null;
     this.attributeClass = null;
 }
Exemplo n.º 31
0
 public SyntaxToken(TokenPosition position)
 {
     Position = position;
 }
Exemplo n.º 32
0
 public void SetPosition(TokenPosition position)
 {
     this.position = position;
 }
Exemplo n.º 33
0
 public SizeOfExpression(Expression typeExpression, TokenPosition position)
     : base(position)
 {
     this.typeExpression = typeExpression;
 }
Exemplo n.º 34
0
 /// <summary>
 ///		Initializes a new token
 /// </summary>
 /// <param name="tokenType"></param>
 /// <param name="text"></param>
 /// <param name="position"></param>
 public Token(TokenType tokenType, string text, TokenPosition position)
 {
     this.Type     = tokenType;
     this.Text     = text;
     this.Position = position;
 }
Exemplo n.º 35
0
 public virtual void CheckAmbiguity(TokenPosition where)
 {
     // Do nothing.
 }
Exemplo n.º 36
0
 public PrefixOperation(int op, Expression variable, TokenPosition position)
     : base(position)
 {
     this.operation = op;
     this.variable  = variable;
 }
Exemplo n.º 37
0
 public ArrayAccessNode(ISyntaxElement left, List <ISyntaxElement> arguments, TokenPosition position)
     : base(position)
 {
     Left      = left;
     Arguments = arguments;
 }
Exemplo n.º 38
0
 public ImportObjectMethod(string externalName, string importName, List <string> generics, List <string> arguments, TokenPosition position)
 {
     ExternalName = externalName;
     ImportName   = importName;
     Generics     = generics;
     Arguments    = arguments;
     Position     = position;
 }
Exemplo n.º 39
0
 public ImportScriptNode(string dotNetType, string methodName, string internalName, List <string> arguments, TokenPosition position)
     : base(position)
 {
     DotNetType = dotNetType;
     MethodName = methodName;
     ImportName = internalName;
     Arguments  = arguments;
 }
Exemplo n.º 40
0
 public Expression(TokenPosition position)
     : base(position)
 {
     this.hints = 0;
 }
Exemplo n.º 41
0
 public T Evaluate <T>(string s, IParserContext context, TokenPosition tokenPosition)
 {
     return(ParseWithContext(s, context, tokenPosition).Evaluate <T>());
 }
Exemplo n.º 42
0
 public object EvaluateToObject(string s, IParserContext context, TokenPosition tokenPosition)
 {
     return(ParseWithContext(s, context, tokenPosition).EvaluateToObject());
 }
Exemplo n.º 43
0
 public IValueWithType Evaluate(string s, IParserContext context, TokenPosition tokenPosition)
 {
     return(ParseWithContext(s, context, tokenPosition).Evaluate());
 }
Exemplo n.º 44
0
 public VariableToken(string name, TokenPosition position)
     : base(position)
 {
     Name = name;
 }
Exemplo n.º 45
0
 public PropertyDefinition(MemberFlags flags, Expression propertyType,
                           Expression nameExpr, AstNode indices, AstNode accessors, TokenPosition position)
     : this(flags, propertyType, "", indices, accessors, position)
 {
     this.nameExpression = nameExpr;
 }
Exemplo n.º 46
0
 public IExpressionWithContext ParseWithContext(string s, IParserContext context, TokenPosition position)
 {
     return(new ExpressionWithContext(Parse(s, position), context));
 }
Exemplo n.º 47
0
 public ReturnNode(ISyntaxElement result, TokenPosition position)
     : base(position)
 {
     Result = result;
 }
Exemplo n.º 48
0
 public BinaryOperatorNode(TokenPosition position) : base(position)
 {
 }
Exemplo n.º 49
0
 public CastOperation(Expression target, Expression value, TokenPosition position)
     : base(position)
 {
     this.target = target;
     this.value  = value;
 }
Exemplo n.º 50
0
 public ObjectImportArgument(string name, string value, TokenPosition pos)
 {
     Name     = name;
     Value    = value;
     Position = pos;
 }
Exemplo n.º 51
0
 public Token CreateInstance(string value, TokenPosition position)
 {
     return(new Token(value, TokenType, position));
 }
Exemplo n.º 52
0
 public Statement(TokenPosition position)
     : base(position)
 {
 }
Exemplo n.º 53
0
 public DefaultExpression(Expression typeExpression, TokenPosition position)
     : base(position)
 {
     this.typeExpression = typeExpression;
 }
Exemplo n.º 54
0
 public IntegerConstant(int value, TokenPosition position)
     : base(position)
 {
     SetNodeType(ConstantType.Create(ChelaType.GetIntType()));
     this.value = value;
 }
Exemplo n.º 55
0
 public SwitchNode(ISyntaxElement value, List <SwitchCase> cases, ISyntaxElement defaultCase, int defaultIndex, TokenPosition position)
     : base(position)
 {
     Value        = value;
     Cases        = cases;
     DefaultCase  = defaultCase;
     DefaultIndex = defaultIndex;
 }
Exemplo n.º 56
0
 public Token(string value, TokenPosition position, TokenType type)
 {
     Position = position;
     Value    = value;
     Type     = type;
 }
Exemplo n.º 57
0
 public ProcedureCallNode(TokenPosition position) : base(position)
 {
 }
Exemplo n.º 58
0
 public WhileStatement(Expression cond, AstNode job, TokenPosition position)
     : base(position)
 {
     this.cond = cond;
     this.job  = job;
 }
Exemplo n.º 59
0
 public IExpressionWithContext ParseWithContext(string s, TokenPosition position)
 {
     return(new ExpressionWithContext(Parse(s, position), _defaultContext));
 }
Exemplo n.º 60
0
 /// <summary>
 ///		Initializes a new token
 /// </summary>
 /// <param name="tokenType"></param>
 /// <param name="position"></param>
 public Token(TokenType tokenType, TokenPosition position)
 {
     this.Type     = tokenType;
     this.Text     = tokenType.Symbol;
     this.Position = position;
 }