Example #1
0
 /// <summary>
 /// Visits the Identifier Literal node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 public override bool VisitIdentifierLiteral(IdentifierLiteralNode node)
 {
     if (node.Parent == null)
     {
         return(false);
     }
     if (node.Token == null)
     {
         return(false);
     }
     return(true);
 }
 public override Expression VisitIdentifierLiteral(IdentifierLiteralNode node)
 {
     // Only nested inside arrays
     if (node.Token.Value == SemanticConstants.True)
     {
         return(this.Context.Compiler.LiteralEncodingStrategy.True(this));
     }
     if (node.Token.Value == SemanticConstants.False)
     {
         return(this.Context.Compiler.LiteralEncodingStrategy.False(this));
     }
     if (node.Token.Value == SemanticConstants.Nil)
     {
         return(this.Context.Compiler.LiteralEncodingStrategy.Nil(this));
     }
     return(this.Context.Compiler.LiteralEncodingStrategy.Symbol(this, node.Token.Value));
 }
Example #3
0
 public override object VisitIdentifierLiteral(IdentifierLiteralNode node)
 {
     // Only nested inside arrays
     if (node.Token.Value == SemanticConstants.True)
     {
         return(true);
     }
     if (node.Token.Value == SemanticConstants.False)
     {
         return(false);
     }
     if (node.Token.Value == SemanticConstants.Nil)
     {
         return(null);
     }
     return(this.Context.Compiler.GetSymbol(node.Token.Value));
 }
Example #4
0
 /// <summary>
 /// Visits the Identifier Literal node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 public virtual TResult VisitIdentifierLiteral(IdentifierLiteralNode node)
 {
     throw new NotImplementedException();
 }
Example #5
0
 public override Expression VisitIdentifierLiteral(IdentifierLiteralNode node)
 {
     this.IsConstant = true;
     return(base.VisitIdentifierLiteral(node)); // Only nested in arrays
 }
Example #6
0
 /// <summary>
 /// Visits the Identifier Literal node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 public virtual TResult VisitIdentifierLiteral(IdentifierLiteralNode node)
 {
     return(default(TResult));            // The default naive implementation
 }