Any kind of literal which supports a prefix or a suffix

Introduced properties

private var _content: String

nitc :: AAugmentedLiteral :: _content

Content of the entity, without prefix nor suffix
private var _prefix: String

nitc :: AAugmentedLiteral :: _prefix

Prefix for the entity, "" if no prefix is found
private var _suffix: String

nitc :: AAugmentedLiteral :: _suffix

Suffix for the entity, "" if no prefix is found
protected fun content: String

nitc :: AAugmentedLiteral :: content

Content of the entity, without prefix nor suffix
protected fun content=(content: String)

nitc :: AAugmentedLiteral :: content=

Content of the entity, without prefix nor suffix
private abstract fun delimiter_end: Char

nitc :: AAugmentedLiteral :: delimiter_end

private abstract fun delimiter_start: Char

nitc :: AAugmentedLiteral :: delimiter_start

abstract fun is_valid_augmentation: Bool

nitc :: AAugmentedLiteral :: is_valid_augmentation

Is the combination of prefixes and suffixes in self valid ?
protected fun prefix: String

nitc :: AAugmentedLiteral :: prefix

Prefix for the entity, "" if no prefix is found
protected fun prefix=(prefix: String)

nitc :: AAugmentedLiteral :: prefix=

Prefix for the entity, "" if no prefix is found
protected fun suffix: String

nitc :: AAugmentedLiteral :: suffix

Suffix for the entity, "" if no prefix is found
protected fun suffix=(suffix: String)

nitc :: AAugmentedLiteral :: suffix=

Suffix for the entity, "" if no prefix is found
private abstract fun text: String

nitc :: AAugmentedLiteral :: text

Returns the text of the token

Redefined properties

redef type SELF: AAugmentedLiteral

nitc $ AAugmentedLiteral :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _content: String

nitc :: AAugmentedLiteral :: _content

Content of the entity, without prefix nor suffix
private var _prefix: String

nitc :: AAugmentedLiteral :: _prefix

Prefix for the entity, "" if no prefix is found
private var _suffix: String

nitc :: AAugmentedLiteral :: _suffix

Suffix for the entity, "" if no prefix is found
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
protected fun content: String

nitc :: AAugmentedLiteral :: content

Content of the entity, without prefix nor suffix
protected fun content=(content: String)

nitc :: AAugmentedLiteral :: content=

Content of the entity, without prefix nor suffix
private abstract fun delimiter_end: Char

nitc :: AAugmentedLiteral :: delimiter_end

private abstract fun delimiter_start: Char

nitc :: AAugmentedLiteral :: delimiter_start

fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
abstract fun is_valid_augmentation: Bool

nitc :: AAugmentedLiteral :: is_valid_augmentation

Is the combination of prefixes and suffixes in self valid ?
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
protected fun prefix: String

nitc :: AAugmentedLiteral :: prefix

Prefix for the entity, "" if no prefix is found
protected fun prefix=(prefix: String)

nitc :: AAugmentedLiteral :: prefix=

Prefix for the entity, "" if no prefix is found
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
protected fun suffix: String

nitc :: AAugmentedLiteral :: suffix

Suffix for the entity, "" if no prefix is found
protected fun suffix=(suffix: String)

nitc :: AAugmentedLiteral :: suffix=

Suffix for the entity, "" if no prefix is found
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
private abstract fun text: String

nitc :: AAugmentedLiteral :: text

Returns the text of the token
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram nitc::AAugmentedLiteral AAugmentedLiteral core::Object Object nitc::AAugmentedLiteral->core::Object nitc::ACharExpr ACharExpr nitc::ACharExpr->nitc::AAugmentedLiteral nitc::AugmentedStringFormExpr AugmentedStringFormExpr nitc::AugmentedStringFormExpr->nitc::AAugmentedLiteral nitc::AStringFormExpr AStringFormExpr nitc::AStringFormExpr->nitc::AugmentedStringFormExpr nitc::ASuperstringExpr ASuperstringExpr nitc::ASuperstringExpr->nitc::AugmentedStringFormExpr nitc::AStringFormExpr... ... nitc::AStringFormExpr...->nitc::AStringFormExpr nitc::ASuperstringExpr... ... nitc::ASuperstringExpr...->nitc::ASuperstringExpr

Parents

interface Object

core :: Object

The root of the class hierarchy.

Children

class ACharExpr

nitc :: ACharExpr

A character literal
class AugmentedStringFormExpr

nitc :: AugmentedStringFormExpr

Any kind of string form with augmentations from prefixes or suffixes

Descendants

class AEndStringExpr

nitc :: AEndStringExpr

The end of a superstrng. eg }abc"
class AMidStringExpr

nitc :: AMidStringExpr

The middle of a superstring. eg }abc{
class AStartStringExpr

nitc :: AStartStringExpr

The start of a superstring. eg "abc{
class AStringExpr

nitc :: AStringExpr

A simple string. eg. "abc"
abstract class AStringFormExpr

nitc :: AStringFormExpr

A string literal
class ASuperstringExpr

nitc :: ASuperstringExpr

A superstring literal. eg "a{x}b{y}c"

Class definitions

nitc $ AAugmentedLiteral
# Any kind of literal which supports a prefix or a suffix
class AAugmentedLiteral
	# Returns the text of the token
	private fun text: String is abstract

	# Is the combination of prefixes and suffixes in `self` valid ?
	fun is_valid_augmentation: Bool is abstract

	private fun delimiter_start: Char is abstract

	private fun delimiter_end: Char is abstract

	# Prefix for the entity, "" if no prefix is found
	protected var prefix: String is lazy do return text.substring(0, text.index_of(delimiter_start))

	# Suffix for the entity, "" if no prefix is found
	protected var suffix: String is lazy do return text.substring_from(text.last_index_of(delimiter_end) + 1)

	# Content of the entity, without prefix nor suffix
	protected var content: String is lazy do
		var npr = text.substring_from(prefix.length)
		return npr.substring(0, npr.length - suffix.length)
	end
end
src/literal.nit:98,1--121,3