Matches floating-point literals.
This pattern only matches nodes of type expression.
Properties
floatLiteral produces a record that contains the following properties:
| Name | Type | Description |
|---|---|---|
isHexFloat |
bool |
true if this float is represented using hexadecimal numerals
|
suffix |
enum? |
The suffix of the literal: either `f` or null.
|
valueString |
string |
The value of the float, represented as a string
|
Inherits properties from:
Example
The following CodeXM pattern:
f matches floatLiteral { .valueString == "2.5" };
... matches this target-code Go expression:
f float32 = 2.5;