NumberLiteral

laika.parse.code.common.NumberLiteral
object NumberLiteral

Configurable base parsers for number literals.

Attributes

Source
NumberLiteral.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

Attributes

Source
NumberLiteral.scala
Supertypes
trait PrefixedParser[Seq[CodeSpan]]
class Parser[Seq[CodeSpan]]
class Object
trait Matchable
class Any
Show all
object digits

Parsers for common sets of digits, like hex or decimal.

Parsers for common sets of digits, like hex or decimal.

Attributes

Source
NumberLiteral.scala
Supertypes
class Object
trait Matchable
class Any
Self type
digits.type
object suffix

Common suffixes for number literal denoting the number type.

Common suffixes for number literal denoting the number type.

Attributes

Source
NumberLiteral.scala
Supertypes
class Object
trait Matchable
class Any
Self type
suffix.type

Value members

Concrete methods

def forDigits(digits: Type[Char]): NumericParser

Creates a new numeric parser for the specified set of digit characters.

Creates a new numeric parser for the specified set of digit characters. Optional prefixes and suffixes can be specified with the API of the returned NumericParser.

Attributes

Source
NumberLiteral.scala

Concrete fields

Parses a binary number literal.

Parses a binary number literal. It must start with 0b or 0B, followed by one or more binary digits, e.g. \0b100110.

Attributes

Source
NumberLiteral.scala

Parses a decimal float with an optional exponent.

Parses a decimal float with an optional exponent.

Attributes

Source
NumberLiteral.scala

Parses a decimal integer.

Parses a decimal integer.

Attributes

Source
NumberLiteral.scala

Parses a hexadecimal number literal.

Parses a hexadecimal number literal. It must start with 0x or 0X, followed by one or more hex digits, e.g. \0x25ff7.

Attributes

Source
NumberLiteral.scala

Parses a hexadecimal float literal.

Parses a hexadecimal float literal. It must start with 0x or 0X, followed by one or more hex digits, e.g. \0x25ff7.fa.

Attributes

Source
NumberLiteral.scala

Parses an octal number literal.

Parses an octal number literal. It must start with 0o or 0O, followed by one or more octal digits, e.g. \0o257.

Attributes

Source
NumberLiteral.scala