Пример #1
0
        /// <summary>
        /// Parses a character expression
        /// </summary>
        private IExpressionNode ParseCharExpression()
        {
            Debugger.Write("Parsing Char Expression");
            CharacterLiteralNode charLit = ParseCharacterLiteral();

            return(new CharacterExpressionNode(charLit));
        }
Пример #2
0
 /// <summary>
 /// Visits the Character Literal node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 public override bool VisitCharacterLiteral(CharacterLiteralNode node)
 {
     if (node.Parent == null)
     {
         return(false);
     }
     if (node.Token == null)
     {
         return(false);
     }
     return(true);
 }
Пример #3
0
 /// <summary>
 /// Visits the Character Literal node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 public virtual TResult VisitCharacterLiteral(CharacterLiteralNode node)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 /// <summary>
 /// Generates code for a character literal node
 /// </summary>
 /// <param name="characterLiteral">The node to generate code for</param>
 private void GenerateCodeForCharacterLiteral(CharacterLiteralNode characterLiteral)
 {
     Debugger.Write("Generating code for CharacterLiteral");
     code.AddInstruction(OpCode.LOADL, 0, 0, (short)characterLiteral.Value);
 }
Пример #5
0
 /// <summary>
 /// Carries out identification on a character literal node
 /// </summary>
 /// <param name="characterLiteral">The node to perform identification on</param>
 private void PerformIdentificationOnCharacterLiteral(CharacterLiteralNode characterLiteral)
 {
 }
 /// <summary>
 /// Creates a new character literal expression node
 /// </summary>
 /// <param name="charLit">The character literal</param>
 public CharacterExpressionNode(CharacterLiteralNode charLit)
 {
     CharLit = charLit;
 }
 public override Expression VisitCharacterLiteral(CharacterLiteralNode node)
 {
     return(this.Context.Compiler.LiteralEncodingStrategy.Character(this, node.Token.Value));
 }
Пример #8
0
 public override object VisitCharacterLiteral(CharacterLiteralNode node)
 {
     return(node.Token.Value);
 }
Пример #9
0
 /// <summary>
 /// Visits the Character Literal node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 public virtual TResult VisitCharacterLiteral(CharacterLiteralNode node)
 {
     return(default(TResult));            // The default naive implementation
 }
 private object GetModelValueFrom(CharacterLiteralNode theCharacterLiteralNode)
 {
     return(theCharacterLiteralNode.Value);
 }