Example #1
0
        public override Node ExitCharLiteral(PerCederberg.Grammatica.Runtime.Token node)
        {
            var s = DoEscapes(node.Image);

            node.AddValue(new CharLiteralElement(s[0]));
            return(node);
        }
Example #2
0
        public override Node ExitHexliteral(PerCederberg.Grammatica.Runtime.Token node)
        {
            var element = IntegralLiteralElement.Create(node.Image, true, inUnaryNegate, context.BuilderOptions);

            node.AddValue(element);
            return(node);
        }
Example #3
0
        public override Node ExitDatetime(PerCederberg.Grammatica.Runtime.Token node)
        {
            var image   = node.Image.Substring(1, node.Image.Length - 2);
            var element = new DateTimeLiteralElement(image, context);

            node.AddValue(element);
            return(node);
        }
Example #4
0
        public override Node ExitTimeSpan(PerCederberg.Grammatica.Runtime.Token node)
        {
            var image   = node.Image.Substring(2, node.Image.Length - 3);
            var element = new TimeSpanLiteralElement(image);

            node.AddValue(element);
            return(node);
        }
 public override Node ExitQuotedString(Token node)
 {
     string quotedString = node.GetImage();
     // Remove first and last char which are both a quote.
     string content = quotedString.Substring(1, quotedString.Length - 2);
     node.AddValue(content);
     return node;
 }
Example #6
0
        public override Node ExitStringLiteral(PerCederberg.Grammatica.Runtime.Token node)
        {
            var s       = DoEscapes(node.Image);
            var element = new StringLiteralElement(s);

            node.AddValue(element);
            return(node);
        }
Example #7
0
		private void ExitIdentifier(Token node)
		{
			if (MyInFieldPropertyExpression == false) {
				return;
			}

			if (MyIdentifiers.ContainsKey(MyMemberExpressionCount) == false) {
				MyIdentifiers.Add(MyMemberExpressionCount, node.Image);
			}
		}
Example #8
0
 public override Node ExitLive2d(Token node)
 {
     node.Values.Add (ScriptKeyword.LIVE2D);
     return node;
 }
Example #9
0
 public override Node ExitZoom(Token node)
 {
     node.Values.Add (ScriptKeyword.ZOOM);
     return node;
 }
Example #10
0
 public virtual Node ExitRightBrace(GrammaticaToken node)
 {
     return(node);
 }
Example #11
0
 public virtual void EnterPower(GrammaticaToken node)
 {
 }
Example #12
0
 public virtual void EnterTimespan(GrammaticaToken node)
 {
 }
Example #13
0
 public virtual void EnterIdentifier(GrammaticaToken node)
 {
 }
Example #14
0
 public virtual void EnterStringLiteral(GrammaticaToken node)
 {
 }
Example #15
0
 public virtual Node ExitRightShift(GrammaticaToken node)
 {
     return(node);
 }
Example #16
0
 public override Node ExitLevel(Token node)
 {
     node.Values.Add(ScriptKeyword.LEVEL);
     return node;
 }
Example #17
0
 public override Node ExitKey9(Token node)
 {
     node.Values.Add (ScriptKeyword.KEY9);
     return node;
 }
Example #18
0
 public override Node ExitIdentifier(Token node)
 {
     node.Values.Add(node.Image);
     return node;
 }
Example #19
0
 public virtual Node ExitInteger(GrammaticaToken node)
 {
     return(node);
 }
Example #20
0
 public override Node ExitMove(Token node)
 {
     node.Values.Add(ScriptKeyword.MOVE);
     return node;
 }
Example #21
0
 public virtual void EnterTrue(GrammaticaToken node)
 {
 }
Example #22
0
 public override Node ExitName(Token node)
 {
     node.Values.Add(ScriptKeyword.NAME);
     return node;
 }
Example #23
0
 public virtual void EnterNullLiteral(GrammaticaToken node)
 {
 }
Example #24
0
 public override Node ExitOr(Token node)
 {
     node.Values.Add(ScriptKeyword.OR);
     return node;
 }
Example #25
0
 public virtual void EnterDatetime(GrammaticaToken node)
 {
 }
Example #26
0
 public override Node ExitParentheseRight(Token node)
 {
     node.Values.Add(ScriptKeyword.PARENTHESE_RIGHT);
     return node;
 }
Example #27
0
 public virtual Node ExitRightParen(GrammaticaToken node)
 {
     return(node);
 }
Example #28
0
 public override Node ExitPeriod(Token node)
 {
     node.Values.Add(ScriptKeyword.PERIOD);
     return node;
 }
Example #29
0
 public virtual Node ExitDot(GrammaticaToken node)
 {
     return(node);
 }
Example #30
0
 public override Node ExitPosition(Token node)
 {
     node.Values.Add(ScriptKeyword.POSITION);
     return node;
 }
Example #31
0
 public override Node ExitWorld(Token node)
 {
     node.Values.Add(ScriptKeyword.WORLD);
     return node;
 }
Example #32
0
 public override Node ExitPosture(Token node)
 {
     node.Values.Add(ScriptKeyword.POSTURE);
     return node;
 }
 public override Node ExitUserName(Token node)
 {
     node.AddValue(node.GetImage().Substring(9).Trim());
     return node;
 }
Example #34
0
 public override Node ExitQuotedText(Token node)
 {
     string quatedText = node.Image;
     quatedText = quatedText.Substring (1, quatedText.Length-2);
     node.Values.Add(quatedText);
     return node;
 }
Example #35
0
 public virtual void EnterRightShift(GrammaticaToken node)
 {
 }
Example #36
0
 public override Node ExitRole(Token node)
 {
     node.Values.Add(ScriptKeyword.ROLE);
     return node;
 }
Example #37
0
 public virtual void EnterInteger(GrammaticaToken node)
 {
 }
Example #38
0
 public override Node ExitSemicolon(Token node)
 {
     node.Values.Add(ScriptKeyword.SEMICOLON);
     return node;
 }
Example #39
0
 public virtual void EnterReal(GrammaticaToken node)
 {
 }
Example #40
0
 public override Node ExitSound(Token node)
 {
     node.Values.Add(ScriptKeyword.SOUND);
     return node;
 }
Example #41
0
 public virtual void EnterCharLiteral(GrammaticaToken node)
 {
 }
Example #42
0
 public override Node ExitSpace(Token node)
 {
     //Space have no meaning, do nothing here
     return node;
 }
Example #43
0
 public virtual void EnterFalse(GrammaticaToken node)
 {
 }
Example #44
0
 public override Node ExitSquareBracketRight(Token node)
 {
     node.Values.Add(ScriptKeyword.SQUARE_BRACKET_RIGHT);
     return node;
 }
Example #45
0
 public virtual Node ExitIdentifier(GrammaticaToken node)
 {
     return(node);
 }
Example #46
0
 public override Node ExitSrc(Token node)
 {
     node.Values.Add(ScriptKeyword.SRC);
     return node;
 }
Example #47
0
 public virtual Node ExitNullLiteral(GrammaticaToken node)
 {
     return(node);
 }
Example #48
0
 public override Node ExitTagParameter(Token node)
 {
     node.Values.Add (ScriptKeyword.TAG);
     return node;
 }
Example #49
0
 public virtual Node ExitTimeSpan(GrammaticaToken node)
 {
     return(node);
 }
Example #50
0
 public override Node ExitText(Token node)
 {
     node.Values.Add(node.Image);
     return node;
 }
Example #51
0
 public virtual Node ExitDatetime(GrammaticaToken node)
 {
     return(node);
 }
Example #52
0
 public override Node ExitTransition(Token node)
 {
     node.Values.Add(ScriptKeyword.TRANSITION);
     return node;
 }
Example #53
0
 public virtual void EnterRightParen(GrammaticaToken node)
 {
 }
Example #54
0
 public override Node ExitType(Token node)
 {
     node.Values.Add(ScriptKeyword.TYPE);
     return node;
 }
Example #55
0
 public virtual void EnterRightBrace(GrammaticaToken node)
 {
 }
Example #56
0
 public override Node ExitVideo(Token node)
 {
     node.Values.Add(ScriptKeyword.VIDEO);
     return node;
 }
Example #57
0
 public virtual void EnterDot(GrammaticaToken node)
 {
 }
Example #58
0
 public override Node ExitVoice(Token node)
 {
     node.Values.Add(ScriptKeyword.VOICE);
     return node;
 }
Example #59
0
 public virtual void EnterArgumentSeparator(GrammaticaToken node)
 {
 }
Example #60
0
 public override Node ExitWeather(Token node)
 {
     node.Values.Add(ScriptKeyword.WEATHER);
     return node;
 }