The ezr² Project 0.1.1
The codebase for the ezr² programming language.
Loading...
Searching...
No Matches
EzrSquared Namespace Reference

Classes

class  Token
 The smallest component in the script identified by the TokenType, grouped together into Runtime.Nodes.Node objects to from source code constructs. More...
 

Enumerations

enum  AccessMod {
  None = 0 , Global = 1 , Private = 2 , Static = 4 ,
  Constant = 8 , LocalScope = 16 , GlobalStatic = Global | Static , PrivateConstant = Private | Constant ,
  PrivateStaticConstant = Private | Static | Constant , InvalidGlobalPrivate = Global | Private
}
 Accessibility modifiers for all Runtime.Context defined scope. More...
 
enum  TokenType : ushort {
  Integer , FloatingPoint , String , Character ,
  CharacterList , KeywordAnd , KeywordOr , KeywordInvert ,
  KeywordNot , KeywordIn , KeywordGlobal , KeywordPrivate ,
  KeywordConstant , KeywordReadonly , KeywordItem , KeywordIf ,
  KeywordElse , KeywordCount , KeywordFrom , KeywordTo ,
  KeywordStep , KeywordAs , KeywordWhile , KeywordSkip ,
  KeywordStop , KeywordMore , KeywordFunction , KeywordSpecial ,
  KeywordObject , KeywordWith , KeywordReturn , KeywordLast ,
  KeywordTry , KeywordCatch , KeywordDefine , KeywordStatic ,
  KeywordDo , KeywordEnd , KeywordInclude , KeywordAll ,
  QeywordF , QeywordL , QeywordE , QeywordC ,
  QeywordT , QeywordN , QeywordW , QeywordFd ,
  QeywordSd , QeywordSb , QeywordOd , QeywordI ,
  QeywordS , QeywordD , QeywordG , QeywordP ,
  QeywordV , Plus , HyphenMinus , Asterisk ,
  Slash , PercentSign , Caret , Ampersand ,
  VerticalBar , Backslash , Tilde , LeftParenthesis ,
  RightParenthesis , LeftSquareBracket , RightSquareBracket , LeftCurlyBracket ,
  RightCurlyBracket , EqualSign , ExclamationMark , LessThanSign ,
  GreaterThanSign , Comma , Period , BitwiseLeftShift ,
  BitwiseRightShift , LessThanOrEqual , GreaterThanOrEqual , Colon ,
  AssignmentAddition , AssignmentSubtraction , AssignmentMultiplication , AssignmentDivision ,
  AssignmentModulo , AssignmentPower , AssignmentBitwiseAnd , AssignmentBitwiseOr ,
  AssignmentBitwiseXOr , AssignmentBitwiseLeftShift , AssignmentBitwiseRightShift , Identifier ,
  NewLine , EndOfFile , Invalid
}
 The identifying type of a Token. More...
 
enum  TokenTypeGroup : ushort {
  Value , Keyword , Qeyword , AssignmentSymbol ,
  Symbol , Special
}
 The type group of a Token. More...
 

Functions

class Position (int index, int line, string file, string script)
 The representation of a position in the script.
 

Enumeration Type Documentation

◆ AccessMod

Accessibility modifiers for all Runtime.Context defined scope.

Enumerator
None 

Default value.

Global 

Stand-in for a global scope.

Private 

Stand-in for a private scope.

Static 

Stand-in for a static scope.

Constant 

Stand-in for a constant reference.

LocalScope 

Stand-in for a local-only scope.

GlobalStatic 

Stand-in for a global static scope.

PrivateConstant 

Stand-in for a private constant scope.

PrivateStaticConstant 

Stand-in for a private static constant scope.

InvalidGlobalPrivate 

Stand-in for an INVALID global private scope.

◆ TokenType

enum EzrSquared.TokenType : ushort

The identifying type of a Token.

Enumerator
Integer 

An integer, part of the TokenTypeGroup.Value type-group.

FloatingPoint 

A floating-point number, part of the TokenTypeGroup.Value type-group.

String 

A text-string, string, or a sequence of characters, part of the TokenTypeGroup.Value type-group.

Character 

A character, part of the TokenTypeGroup.Value type-group.

CharacterList 

A character list, which is a mutable string, part of the TokenTypeGroup.Value type-group.

KeywordAnd 

The keyword "and", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordOr 

The keyword "or", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordInvert 

The keyword "invert", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordNot 

The keyword "not", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordIn 

The keyword "in", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordGlobal 

The keyword "global", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordPrivate 

The keyword "private", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordConstant 

The keyword "constant", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordReadonly 

The keyword "readonly", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordItem 

The keyword "item", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordIf 

The keyword "if", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordElse 

The keyword "else", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordCount 

The keyword "count", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordFrom 

The keyword "from", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordTo 

The keyword "to", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordStep 

The keyword "step", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordAs 

The keyword "as", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordWhile 

The keyword "while", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordSkip 

The keyword "skip", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordStop 

The keyword "stop", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordMore 

The keyword "more", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordFunction 

The keyword "function", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordSpecial 

The keyword "special", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

This keyword was previously used in the "special functions" structure,
which were like magic functions in Python, i.e. operator overloading functions.

Since the structure has now been replaced with normal functions with dedicated names,
this keyword is no longer in use and will be removed in later versions of ezr² if no
new uses are found.

KeywordObject 

The keyword "object", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordWith 

The keyword "with", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordReturn 

The keyword "return", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordLast 

The keyword "last", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordTry 

The keyword "try", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordCatch 

The keyword "catch", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordDefine 

The keyword "define", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordStatic 

The keyword "static", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordDo 

The keyword "do", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordEnd 

The keyword "end", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordInclude 

The keyword "include", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

KeywordAll 

The keyword "all", case-insensitive, part of the TokenTypeGroup.Keyword type-group.

QeywordF 

The QuickSyntax keyword "f", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordL 

The QuickSyntax keyword "l", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordE 

The QuickSyntax keyword "e", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordC 

The QuickSyntax keyword "c", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordT 

The QuickSyntax keyword "t", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordN 

The QuickSyntax keyword "n", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordW 

The QuickSyntax keyword "w", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordFd 

The QuickSyntax keyword "fd", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordSd 

The QuickSyntax keyword "sd", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordSb 

The QuickSyntax keyword "sb", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordOd 

The QuickSyntax keyword "od", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordI 

The QuickSyntax keyword "i", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordS 

The QuickSyntax keyword "s", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordD 

The QuickSyntax keyword "d", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordG 

The QuickSyntax keyword "g", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordP 

The QuickSyntax keyword "p", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

QeywordV 

The QuickSyntax keyword "v", case-insensitive, part of the TokenTypeGroup.Qeyword type-group.

Plus 

The '+' symbol, part of the TokenTypeGroup.Symbol type-group.

HyphenMinus 

The '-' symbol, part of the TokenTypeGroup.Symbol type-group.

Asterisk 

The '*' symbol, part of the TokenTypeGroup.Symbol type-group.

Slash 

The '/' symbol, part of the TokenTypeGroup.Symbol type-group.

PercentSign 

The '' symbol, part of the TokenTypeGroup.Symbol type-group.

Caret 

The '^' symbol, part of the TokenTypeGroup.Symbol type-group.

Ampersand 

The '&' symbol, part of the TokenTypeGroup.Symbol type-group.

VerticalBar 

The '|' symbol, part of the TokenTypeGroup.Symbol type-group.

Backslash 

The '\' symbol, part of the TokenTypeGroup.Symbol type-group.

Tilde 

The '~' symbol, part of the TokenTypeGroup.Symbol type-group.

LeftParenthesis 

The '(' symbol, part of the TokenTypeGroup.Symbol type-group.

RightParenthesis 

The ')' symbol, part of the TokenTypeGroup.Symbol type-group.

LeftSquareBracket 

The '[' symbol, part of the TokenTypeGroup.Symbol type-group.

RightSquareBracket 

The ']' symbol, part of the TokenTypeGroup.Symbol type-group.

LeftCurlyBracket 

The '{' symbol, part of the TokenTypeGroup.Symbol type-group.

RightCurlyBracket 

The '}' symbol, part of the TokenTypeGroup.Symbol type-group.

EqualSign 

The '=' symbol, part of the TokenTypeGroup.Symbol type-group.

ExclamationMark 

The '!' symbol, part of the TokenTypeGroup.Symbol type-group.

LessThanSign 

The '<' symbol, part of the TokenTypeGroup.Symbol type-group.

GreaterThanSign 

The '>' symbol, part of the TokenTypeGroup.Symbol type-group.

Comma 

The ',' symbol, part of the TokenTypeGroup.Symbol type-group.

Period 

The '.' symbol, part of the TokenTypeGroup.Symbol type-group.

BitwiseLeftShift 

The '<<' symbols, used in the bitwise-left-shift operation, part of the TokenTypeGroup.Symbol type-group.

BitwiseRightShift 

The '>>' symbols, used in the bitwise-right-shift operation, part of the TokenTypeGroup.Symbol type-group.

LessThanOrEqual 

The '<=' symbols, used in comparison operations, part of the TokenTypeGroup.Symbol type-group.

GreaterThanOrEqual 

The '>=' symbols, used in comparison operations, part of the TokenTypeGroup.Symbol type-group.

Colon 

The ':' symbol, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentAddition 

The ':+' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentSubtraction 

The ':-' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentMultiplication 

The ':*' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentDivision 

The ':/' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentModulo 

The ':' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentPower 

The ':^' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentBitwiseAnd 

The ':&' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentBitwiseOr 

The ':|' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentBitwiseXOr 

The ':\' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentBitwiseLeftShift 

The ':<<' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

AssignmentBitwiseRightShift 

The ':>>' symbols, used in assignment operations, part of the TokenTypeGroup.AssignmentSymbol type-group.

Identifier 

Represents an identifier, a name that is assigned by the programmer for an element such as variable, class, function, etc.
Part of the TokenTypeGroup.Special type-group.

NewLine 

Represents a new line, part of the TokenTypeGroup.Special type-group.

EndOfFile 

Represents the end of a script, part of the TokenTypeGroup.Special type-group.

Invalid 

Represents an invalid token, part of the TokenTypeGroup.Special type-group.

If this is passed onto any stage after the Parser, something has gone real wrong.

◆ TokenTypeGroup

The type group of a Token.

If you want to see which group a token type is in, check the documentation for that type.

Enumerator
Value 

Groups primitive-type tokens, like integers or strings.

Keyword 

Groups keyword tokens.

Qeyword 

Groups QuickSyntax keyword tokens.

AssignmentSymbol 

Groups variable assignment symbol tokens.

Symbol 

Groups general symbol tokens.

Special 

Groups special tokens.

Function Documentation

◆ Position()

class EzrSquared.Position ( int index,
int line,
string file,
string script )

The representation of a position in the script.

Parameters
indexThe index of the Position in the script.
lineThe line number of the Position in the script.
fileThe file name/path of the script.
scriptThe script as text.

A position that does not exist.

The index of the Position in the script.

The line number of the Position in the script.

The file name/path of the script.

The script as text.

Advances the Position and increments Index by 1. If currentChar is a new-line character, Line is also incremented by 1.

Parameters
currentCharThe character associated with the Position before advancing.

Reverses to the given index.

Parameters
indexThe index to reverse to.
lineDecrementThe decrement for Line.

Advances the Position and increments Index by 1.

Creates a copy of the Position object.

Returns
The copy.