30 lines
497 B
Plaintext
30 lines
497 B
Plaintext
[[painless-identifiers]]
|
|
=== Identifiers
|
|
|
|
Specify identifiers to <<declaration, declare>>, <<assignment, assign>>, and
|
|
<<painless-operators, use>> variables, <<dot-operator, access fields>>, and
|
|
<<dot-operator, call methods>>. <<painless-keywords, Keywords>> and
|
|
<<painless-types, types>> cannot be used as identifiers.
|
|
|
|
*Grammar*
|
|
[source,ANTLR4]
|
|
----
|
|
ID: [_a-zA-Z] [_a-zA-Z-0-9]*;
|
|
----
|
|
|
|
*Examples*
|
|
|
|
* Variations of identifiers.
|
|
+
|
|
[source,Painless]
|
|
----
|
|
a
|
|
Z
|
|
id
|
|
list
|
|
list0
|
|
MAP25
|
|
_map25
|
|
Map_25
|
|
----
|