octalLiteral method

Parser<ConstantNode> octalLiteral()
inherited

Implementation

Parser<ConstantNode> octalLiteral() =>
    ((string('0o') | string('0O')) &
            (pattern('0-7') | char('_')).plus().flatten())
        .flatten()
        .map(
          (s) => ConstantNode(
            int.parse(s.substring(2).replaceAll('_', ''), radix: 8),
          ),
        );