예제 #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)));
        }
예제 #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)));
        }
예제 #3
0
 void ISyntaxVisitor.VisitIntegerLiteralSyntax(IntegerLiteralSyntax syntax) => ReplaceCurrent(syntax, ReplaceIntegerLiteralSyntax);
예제 #4
0
 public virtual void VisitIntegerLiteralSyntax(IntegerLiteralSyntax syntax)
 {
     this.Visit(syntax.Literal);
 }