示例#1
0
        private static bool TryTakeNumericLiteral(TokenKeeper pos, out ExpressionNode node)
        {
            if (pos.Next.TokenType == TokenType.NumericLiteral)
            {
                node = new NumericLiteralNode(pos.Take());
                return(true);
            }

            node = null;
            return(false);
        }
示例#2
0
        public void VisitNumericLiteral(NumericLiteralNode node)
        {
            IType?type = _typeManager.GetType("int", PointerMode.NotAPointer);

            if (type == null)
            {
                throw new InvalidOperationException("Primitive types not registered with type system.");
            }

            SetAndCacheType(node, type);
        }
示例#3
0
 public void VisitNumericLiteral(NumericLiteralNode node)
 {
     VisitPreOrder(node);
     VisitPostOrder(node);
 }
示例#4
0
 public void VisitNumericLiteral(NumericLiteralNode node)
 {
     Print($"Numeric Literal ({node.Value})");
 }
示例#5
0
 public void VisitNumericLiteral(NumericLiteralNode node)
 {
     _functionBuilder.AddInstruction(OpCode.PUSHWORD, node.Value);
 }
示例#6
0
 public void VisitNumericLiteral(NumericLiteralNode node)
 {
     NumericLiteralVisitor?.Visit(node);
 }
示例#7
0
 public virtual void VisitNumericLiteral(NumericLiteralNode node)
 {
     VisitDefaultExpression(node);
 }
 public void VisitNumericLiteral(NumericLiteralNode node)
 {
 }
示例#9
0
 public void VisitNumericLiteral(NumericLiteralNode node)
 {
     _visitedValue = Value.ConstInt(_genContext.Context.Int32Type, (ulong)node.Value, true);
 }