public virtual void EnterTitleCompilerStatement(Token titleToken, Token titleLiteral) { TitleDirective titleDirective = (TitleDirective)CompilerDirective; System.Diagnostics.Debug.Assert(titleLiteral.TokenFamily == TokenFamily.AlphanumericLiteral); string title = ((AlphanumericLiteralTokenValue)titleLiteral.LiteralValue).Text; titleDirective.Title = title; }
public override void EnterTitleCompilerStatement(CobolCompilerDirectivesParser.TitleCompilerStatementContext context) { TitleDirective titleDirective = new TitleDirective(); CompilerDirective = titleDirective; string title = ParseTreeUtils.GetAlphanumericLiteral(context.alphanumericValue2()); titleDirective.Title = title; }
public void GetStringTest_ShortForm() { // Arrange string title = "some title"; Directive directive = new TitleDirective(title); string expectedText = $"{{t: {title}}}"; DirectiveHandler sut = TitleHandler.Instance; // Act string text = sut.GetString(directive, shorten: true); // Assert Assert.AreEqual(expectedText, text); }
public virtual void StartTitleCompilerStatement() { TitleDirective titleDirective = new TitleDirective(); CompilerDirective = titleDirective; }