override public void VisitLongIntLiteral(LongIntLiteral x) { //string format= "Decimal"; //switch (x.Format) //{ // case Literal.LiteralFormat.Binary: format = "Binary"; break; // case Literal.LiteralFormat.Octal: format = "Octal"; break; // case Literal.LiteralFormat.Hexadecimal: format = "Hexadecimal"; break; //} _serializer.Serialize(typeof(LongIntLiteral).Name, SerializeSpan(x.Span), new NodeObj("Value", x.Value.ToString()) /*, new NodeObj("Format", format)*/); }
public static Literal /*!*/ Create(Text.Span position, object value, AccessType access) { Literal result; if (value == null) { result = new NullLiteral(position); } else if (value.GetType() == typeof(int)) { result = new IntLiteral(position, (int)value); } else if (value.GetType() == typeof(string)) { result = new StringLiteral(position, (string)value); } else if (value.GetType() == typeof(bool)) { result = new BoolLiteral(position, (bool)value); } else if (value.GetType() == typeof(double)) { result = new DoubleLiteral(position, (double)value); } else if (value.GetType() == typeof(long)) { result = new LongIntLiteral(position, (long)value); } else if (value.GetType() == typeof(PhpBytes)) { result = new BinaryStringLiteral(position, ((PhpBytes)value).ReadonlyData); } else { throw new ArgumentException("value"); } // Debug.Assert(result != null); result.NodeCompiler <IExpressionCompiler>().Access = access; // return(result); }
public override void VisitLongIntLiteral(LongIntLiteral x) { _composer.ConsumeLiteral(x); }
virtual public void VisitLongIntLiteral(LongIntLiteral x) { // nothing }
override public void VisitLongIntLiteral(LongIntLiteral x) { _serializer.Serialize(typeof(LongIntLiteral).Name, SerializeSpan(x.Span), new NodeObj("Value", x.Value.ToString())); }
public override void VisitLongIntLiteral(LongIntLiteral x) { visitConstantNularyElement(x, (e) => e.LongIntLiteral(x) ); }
/// <inheritdoc /> public override void VisitLongIntLiteral(LongIntLiteral x) { RValueResult(x); }
/// <summary> /// Create long integer representation of given literal /// </summary> /// <param name="x">Literal value</param> /// <returns>Created literal value representation</returns> public virtual MemoryEntry LongIntLiteral(LongIntLiteral x) { return(new MemoryEntry(OutSet.CreateLong((long)x.Value))); }
/// <inheritdoc /> public override void VisitLongIntLiteral(LongIntLiteral x) { literal = outSet.CreateLong((long)x.Value); }
/// <summary> /// Visits the long int literal. /// </summary> /// <param name="x">The x.</param> public override void VisitLongIntLiteral(LongIntLiteral x) { initializationValue = expressionResolver.LongIntLiteral(x); }
public override void VisitLongIntLiteral(LongIntLiteral x) { VisitSpecificElementProlog(); SerializeToken(nameof(x.Value), x.Value.ToString(), x.Span); }