W3cubDocs

/Haxe

Constant

package haxe.macro

import haxe.macro.Expr

Available on all platforms

Represents a constant.

See also:

Values

CInt(v:String)

Represents an integer literal.

CFloat(f:String)

Represents a float literal.

CString(s:String, kind:StringLiteralKind)

Represents a string literal.

CIdent(s:String)

Represents an identifier.

CRegexp(r:String, opt:String)

Represents a regular expression literal.

Example: ~/haxe/i

  • The first argument haxe is a string with regular expression pattern.
  • The second argument i is a string with regular expression flags.

See also:

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/haxe/macro/Constant.html