Beispiel #1
0
        protected virtual IntegerLiteralSyntax ReplaceIntegerLiteralSyntax(IntegerLiteralSyntax syntax)
        {
            var hasChanges = Rewrite(syntax.Literal, out var literal);

            if (!hasChanges)
            {
                return(syntax);
            }

            return(new IntegerLiteralSyntax(literal, long.Parse(literal.Text)));
        }
Beispiel #2
0
        protected virtual SyntaxBase ReplaceIntegerLiteralSyntax(IntegerLiteralSyntax syntax)
        {
            var hasChanges = TryRewriteStrict(syntax.Literal, out var literal);

            if (!hasChanges)
            {
                return(syntax);
            }

            return(new IntegerLiteralSyntax(literal, ulong.Parse(literal.Text)));
        }
Beispiel #3
0
 void ISyntaxVisitor.VisitIntegerLiteralSyntax(IntegerLiteralSyntax syntax) => ReplaceCurrent(syntax, ReplaceIntegerLiteralSyntax);
Beispiel #4
0
 public virtual void VisitIntegerLiteralSyntax(IntegerLiteralSyntax syntax)
 {
     this.Visit(syntax.Literal);
 }