public void CompileConstantDecl(ConstantDecl cstDecl) { XmlElement tmpElement = document.CreateElement("ConstantDecl"); ProcessPropertyInitializers(tmpElement, cstDecl.Initializers); currentElement.AppendChild(tmpElement); }
public override void VisitConstantDecl(ConstantDecl x) { VisitSpecificElementProlog(); SerializeToken(nameof(x.Name), x.Name.ToString(), x.Name.Span); base.VisitConstantDecl(x); }
public override void ConstantDeclaration(ConstantDecl x, MemoryEntry constantValue) { var constantName = ".constant_" + x.Name; var constantVar = new VariableIdentifier(constantName); OutSet.FetchFromGlobal(constantVar.DirectName); OutSet.GetVariable(constantVar).WriteMemory(OutSnapshot, constantValue); }
public override void VisitConstantDecl(ConstantDecl x) { ConsumeToken(Tokens.T_STRING, x.Name.Name.Value); if (x.Initializer != null) // always true { ConsumeToken(Tokens.T_EQ, "="); VisitElement(x.Initializer); } }
public void CompileConstantDecl(ConstantDecl cstDecl) { textWriter.Write("const "); for (int i = 0; i < cstDecl.Initializers.Length; ++i) { if (i > 0) { textWriter.Write(", "); } DumpPropertyInitializer(cstDecl.Initializers[i]); } textWriter.WriteLine(";"); }
/// <summary> /// Visit constant initializer expression. /// </summary> /// <param name="x"></param> virtual public void VisitConstantDecl(ConstantDecl x) { VisitElement(x.Initializer); }
internal ConstantDeclPoint(ConstantDecl declaration, ValuePoint initializer) { Declaration = declaration; Initializer = initializer; }
/// <summary> /// Is called on <c>const x = 5</c> declarations /// </summary> /// <param name="x">Constant declaration</param> /// <param name="constantValue">Value assigned into constant</param> public abstract void ConstantDeclaration(ConstantDecl x, MemoryEntry constantValue);
public static void Analyze(this ConstantDecl /*!*/ node, Analyzer /*!*/ analyzer) { node.NodeCompiler <IConstantDeclCompiler>().Analyze(node, analyzer); }
void IConstantDeclCompiler.Analyze(ConstantDecl node, Analyzer analyzer) { Analyze((T)node, analyzer); }