C# Class Loyc.Syntax.CodeSymbols

A list of common symbols that have special meaning somewhere in Loyc or EC#: operators, built-in data types, keywords, trivia, etc.
Show file Open project: qwertie/ecsharp Class Usage Examples

Public Properties

Property Type Description
Abstract Symbol
Add Symbol
AddAssign Symbol
Alias Symbol
AltList Symbol
And Symbol
AndBits Symbol
AndBitsAssign Symbol
Array Symbol
ArrayInit Symbol
As Symbol
Assembly Symbol
Assign Symbol
Async Symbol
AtSign Symbol
Await Symbol
Backslash Symbol
BadCode Symbol
Base Symbol
Bool Symbol
Braces Symbol
Break Symbol
Case Symbol
Cast Symbol
Catch Symbol
Char Symbol
Checked Symbol
Class Symbol
Colon Symbol
ColonColon Symbol
Comma Symbol
ConcatAssign Symbol
Const Symbol
Constructor Symbol
Continue Symbol
CsPPRawText Symbol
CsRawText Symbol
Decimal Symbol
Default Symbol
Delegate Symbol
Div Symbol
DivAssign Symbol
Do Symbol
DoWhile Symbol
Dot Symbol
DotDot Symbol
DotDotDot Symbol
Double Symbol
DoubleBang Symbol
Dynamic Symbol
Else Symbol
Enum Symbol
Eq Symbol
Error Symbol
Event Symbol
Exp Symbol
ExpAssign Symbol
Explicit Symbol
Extern Symbol
FilePrivate Symbol
Finally Symbol
Fixed Symbol
Fn Symbol
For Symbol
ForEach Symbol
Forward Symbol
GE Symbol
GT Symbol
Goto Symbol
GotoCase Symbol
If Symbol
Implicit Symbol
Import Symbol
In Symbol
IndexBracks Symbol
InitializerAssignment Symbol
Int16 Symbol
Int32 Symbol
Int64 Symbol
Int8 Symbol
Interface Symbol
Internal Symbol
Is Symbol
IsLegal Symbol
LE Symbol
LT Symbol
Label Symbol
Lambda Symbol
LeftArrow Symbol
Lock Symbol
Missing Symbol
Mod Symbol
ModAssign Symbol
Module Symbol
Mul Symbol
MulAssign Symbol
NamedArg Symbol
Namespace Symbol
Neq Symbol
New Symbol
Not Symbol
NotBits Symbol
Note Symbol
NullCoalesce Symbol
NullCoalesceAssign Symbol
NullDot Symbol
NullIndexBracks Symbol
Object Symbol
Of Symbol
Operator Symbol
Or Symbol
OrBits Symbol
OrBitsAssign Symbol
Out Symbol
Override Symbol
PPDefine Symbol
PPElIf Symbol
PPElse Symbol
PPEndIf Symbol
PPEndRegion Symbol
PPError Symbol
PPIf Symbol
PPLine Symbol
PPNote Symbol
PPPragma Symbol
PPRegion Symbol
PPUndef Symbol
PPWarning Symbol
Params Symbol
Partial Symbol
PostDec Symbol
PostInc Symbol
PreDec Symbol
PreInc Symbol
Private Symbol
Property Symbol
Protected Symbol
ProtectedIn Symbol
PtrArrow Symbol
Public Symbol
QuestionMark Symbol
QuickBind Symbol
QuickBindAssign Symbol
RawText Symbol
Readonly Symbol
Ref Symbol
Result Symbol
Return Symbol
Sealed Symbol
Semicolon Symbol
Shl Symbol
ShlAssign Symbol
Shr Symbol
ShrAssign Symbol
Single Symbol
Sizeof Symbol
Splice Symbol
StackAlloc Symbol
Static Symbol
String Symbol
Struct Symbol
Sub Symbol
SubAssign Symbol
Substitute Symbol
Switch Symbol
This Symbol
Throw Symbol
Trait Symbol
TriviaAppendStatement Symbol
TriviaCsPPRawText Symbol
TriviaCsRawText Symbol
TriviaDoubleVerbatim Symbol
TriviaDummyNode Symbol
TriviaForwardedProperty Symbol
TriviaInParens Symbol
TriviaMLComment Symbol
TriviaMacroAttribute Symbol
TriviaNewline Symbol
TriviaRawText Symbol
TriviaSLComment Symbol
TriviaSpaces Symbol
TriviaTrailing Symbol
TriviaUseOperatorKeyword Symbol
TriviaWordAttribute Symbol
Try Symbol
Tuple Symbol
TwoDimensionalArray Symbol
Typeof Symbol
UInt16 Symbol
UInt32 Symbol
UInt64 Symbol
UInt8 Symbol
Unchecked Symbol
Unsafe Symbol
UsingCast Symbol
UsingStmt Symbol
Var Symbol
Virtual Symbol
Void Symbol
Volatile Symbol
Warning Symbol
Where Symbol
While Symbol
Xor Symbol
XorBits Symbol
XorBitsAssign Symbol
Yield Symbol
_AddressOf Symbol
_Bracks Symbol
_Concat Symbol
_Dereference Symbol
_Destruct Symbol
_HashMark Symbol
_Negate Symbol
_Pointer Symbol
_RightArrow Symbol
_TemplateArg Symbol
_UnaryPlus Symbol
add Symbol
get Symbol
remove Symbol
set Symbol
value Symbol

Public Methods

Method Description
CountArrayDimensions ( Symbol s ) : int

Returns the rank of an array symbol when IsArrayKeyword is true, or 0 if the symbol does not represent an array type.

GetArrayKeyword ( int dims ) : Symbol

Gets the Symbol for an array with the specified number of dimensions, e.g. GetArrayKeyword(3) returns [,,].

IsArrayKeyword ( Symbol s ) : bool

Returns true if the symbol is a pair of square brackets with zero or more commas inside, e.g. "[,]", which in EC# represents an array type of a specific number of dimensions.

IsTriviaSymbol ( Symbol name ) : bool

Method Details

CountArrayDimensions() public static method

Returns the rank of an array symbol when IsArrayKeyword is true, or 0 if the symbol does not represent an array type.
public static CountArrayDimensions ( Symbol s ) : int
s Symbol
return int

GetArrayKeyword() public static method

Gets the Symbol for an array with the specified number of dimensions, e.g. GetArrayKeyword(3) returns [,,].
public static GetArrayKeyword ( int dims ) : Symbol
dims int
return Symbol

IsArrayKeyword() public static method

Returns true if the symbol is a pair of square brackets with zero or more commas inside, e.g. "[,]", which in EC# represents an array type of a specific number of dimensions.
public static IsArrayKeyword ( Symbol s ) : bool
s Symbol
return bool

IsTriviaSymbol() public static method

public static IsTriviaSymbol ( Symbol name ) : bool
name Symbol
return bool

Property Details

Abstract public static property

public static Symbol Abstract
return Symbol

Add public static property

public static Symbol Add
return Symbol

AddAssign public static property

public static Symbol AddAssign
return Symbol

Alias public static property

public static Symbol Alias
return Symbol

AltList public static property

# is used for lists of things in definition constructs, e.g. #class(Derived, #(Base, IEnumerable), {...}). For a time, #tuple was used for this purpose; the problem is that a find-and-replace operation intended to find run-time tuples could accidentally match one of these lists. So I decided to dedicate # for use inside special constructs; its meaning depends on context.
public static Symbol AltList
return Symbol

And public static property

public static Symbol And
return Symbol

AndBits public static property

public static Symbol AndBits
return Symbol

AndBitsAssign public static property

public static Symbol AndBitsAssign
return Symbol

Array public static property

public static Symbol Array
return Symbol

ArrayInit public static property

public static Symbol ArrayInit
return Symbol

As public static property

public static Symbol As
return Symbol

Assembly public static property

public static Symbol Assembly
return Symbol

Assign public static property

public static Symbol Assign
return Symbol

Async public static property

public static Symbol Async
return Symbol

AtSign public static property

public static Symbol AtSign
return Symbol

Await public static property

public static Symbol Await
return Symbol

Backslash public static property

public static Symbol Backslash
return Symbol

BadCode public static property

An identifier or call with this Name indicates that parsing or analysis failed earlier and that an error message has already been printed.
When code in a compiler sees this symbol it should be seen as a signal to avoid printing further error messages that involve the same node. Typically, a node named #badCode should replace the bad code, and it may have an argument that describes the error, which could be printed at runtime if compilation continues to completion.
public static Symbol BadCode
return Symbol

Base public static property

public static Symbol Base
return Symbol

Bool public static property

public static Symbol Bool
return Symbol

Braces public static property

public static Symbol Braces
return Symbol

Break public static property

public static Symbol Break
return Symbol

Case public static property

public static Symbol Case
return Symbol

Cast public static property

public static Symbol Cast
return Symbol

Catch public static property

public static Symbol Catch
return Symbol

Char public static property

public static Symbol Char
return Symbol

Checked public static property

public static Symbol Checked
return Symbol

Class public static property

public static Symbol Class
return Symbol

Colon public static property

public static Symbol Colon
return Symbol

ColonColon public static property

public static Symbol ColonColon
return Symbol

Comma public static property

public static Symbol Comma
return Symbol

ConcatAssign public static property

public static Symbol ConcatAssign
return Symbol

Const public static property

public static Symbol Const
return Symbol

Constructor public static property

public static Symbol Constructor
return Symbol

Continue public static property

public static Symbol Continue
return Symbol

CsPPRawText public static property

public static Symbol CsPPRawText
return Symbol

CsRawText public static property

public static Symbol CsRawText
return Symbol

Decimal public static property

public static Symbol Decimal
return Symbol

Default public static property

public static Symbol Default
return Symbol

Delegate public static property

public static Symbol Delegate
return Symbol

Div public static property

public static Symbol Div
return Symbol

DivAssign public static property

public static Symbol DivAssign
return Symbol

Do public static property

public static Symbol Do
return Symbol

DoWhile public static property

public static Symbol DoWhile
return Symbol

Dot public static property

public static Symbol Dot
return Symbol

DotDot public static property

public static Symbol DotDot
return Symbol

DotDotDot public static property

public static Symbol DotDotDot
return Symbol

Double public static property

public static Symbol Double
return Symbol

DoubleBang public static property

public static Symbol DoubleBang
return Symbol

Dynamic public static property

public static Symbol Dynamic
return Symbol

Else public static property

public static Symbol Else
return Symbol

Enum public static property

public static Symbol Enum
return Symbol

Eq public static property

public static Symbol Eq
return Symbol

Error public static property

public static Symbol Error
return Symbol

Event public static property

public static Symbol Event
return Symbol

Exp public static property

public static Symbol Exp
return Symbol

ExpAssign public static property

public static Symbol ExpAssign
return Symbol

Explicit public static property

public static Symbol Explicit
return Symbol

Extern public static property

public static Symbol Extern
return Symbol

FilePrivate public static property

Used with #alias to indicate that an alias is local to the current source file. [#filePrivate] #alias(X = Y, #()) is the long form of using X = Y in EC#.
public static Symbol FilePrivate
return Symbol

Finally public static property

public static Symbol Finally
return Symbol

Fixed public static property

public static Symbol Fixed
return Symbol

Fn public static property

public static Symbol Fn
return Symbol

For public static property

public static Symbol For
return Symbol

ForEach public static property

public static Symbol ForEach
return Symbol

Forward public static property

public static Symbol Forward
return Symbol

GE public static property

public static Symbol GE
return Symbol

GT public static property

public static Symbol GT
return Symbol

Goto public static property

public static Symbol Goto
return Symbol

GotoCase public static property

public static Symbol GotoCase
return Symbol

If public static property

public static Symbol If
return Symbol

Implicit public static property

public static Symbol Implicit
return Symbol

Import public static property

public static Symbol Import
return Symbol

In public static property

public static Symbol In
return Symbol

IndexBracks public static property

public static Symbol IndexBracks
return Symbol

InitializerAssignment public static property

public static Symbol InitializerAssignment
return Symbol

Int16 public static property

public static Symbol Int16
return Symbol

Int32 public static property

public static Symbol Int32
return Symbol

Int64 public static property

public static Symbol Int64
return Symbol

Int8 public static property

public static Symbol Int8
return Symbol

Interface public static property

public static Symbol Interface
return Symbol

Internal public static property

Provides general access within a library or program (implies #protected_in).
public static Symbol Internal
return Symbol

Is public static property

public static Symbol Is
return Symbol

IsLegal public static property

public static Symbol IsLegal
return Symbol

LE public static property

public static Symbol LE
return Symbol

LT public static property

public static Symbol LT
return Symbol

Label public static property

public static Symbol Label
return Symbol

Lambda public static property

public static Symbol Lambda
return Symbol

LeftArrow public static property

public static Symbol LeftArrow
return Symbol

Lock public static property

public static Symbol Lock
return Symbol

Missing public static property

public static Symbol Missing
return Symbol

Mod public static property

public static Symbol Mod
return Symbol

ModAssign public static property

public static Symbol ModAssign
return Symbol

Module public static property

public static Symbol Module
return Symbol

Mul public static property

public static Symbol Mul
return Symbol

MulAssign public static property

public static Symbol MulAssign
return Symbol

NamedArg public static property

public static Symbol NamedArg
return Symbol

Namespace public static property

public static Symbol Namespace
return Symbol

Neq public static property

public static Symbol Neq
return Symbol

New public static property

public static Symbol New
return Symbol

Not public static property

public static Symbol Not
return Symbol

NotBits public static property

public static Symbol NotBits
return Symbol

Note public static property

public static Symbol Note
return Symbol

NullCoalesce public static property

public static Symbol NullCoalesce
return Symbol

NullCoalesceAssign public static property

public static Symbol NullCoalesceAssign
return Symbol

NullDot public static property

public static Symbol NullDot
return Symbol

NullIndexBracks public static property

public static Symbol NullIndexBracks
return Symbol

Object public static property

public static Symbol Object
return Symbol

Of public static property

public static Symbol Of
return Symbol

Operator public static property

public static Symbol Operator
return Symbol

Or public static property

public static Symbol Or
return Symbol

OrBits public static property

public static Symbol OrBits
return Symbol

OrBitsAssign public static property

public static Symbol OrBitsAssign
return Symbol

Out public static property

public static Symbol Out
return Symbol

Override public static property

public static Symbol Override
return Symbol

PPDefine public static property

public static Symbol PPDefine
return Symbol

PPElIf public static property

public static Symbol PPElIf
return Symbol

PPElse public static property

public static Symbol PPElse
return Symbol

PPEndIf public static property

public static Symbol PPEndIf
return Symbol

PPEndRegion public static property

public static Symbol PPEndRegion
return Symbol

PPError public static property

public static Symbol PPError
return Symbol

PPIf public static property

public static Symbol PPIf
return Symbol

PPLine public static property

public static Symbol PPLine
return Symbol

PPNote public static property

public static Symbol PPNote
return Symbol

PPPragma public static property

public static Symbol PPPragma
return Symbol

PPRegion public static property

public static Symbol PPRegion
return Symbol

PPUndef public static property

public static Symbol PPUndef
return Symbol

PPWarning public static property

public static Symbol PPWarning
return Symbol

Params public static property

public static Symbol Params
return Symbol

Partial public static property

public static Symbol Partial
return Symbol

PostDec public static property

public static Symbol PostDec
return Symbol

PostInc public static property

public static Symbol PostInc
return Symbol

PreDec public static property

public static Symbol PreDec
return Symbol

PreInc public static property

public static Symbol PreInc
return Symbol

Private public static property

Revokes access outside the same space and nested spaces. This can be used in spaces in which the default is not private to request private as a starting point. Therefore, other flags (e.g. #protected_ex) can be added to this flag to indicate what access the user wants to provide instead.
The name #private may be slightly confusing, since a symbol marked #private is not actually private when there are other access markers included at the same time. I considered calling it #revoke instead, since its purpose is to revoke the default access modifiers of the space, but I was concerned that someone might want to reserve #revoke for some other purpose.
public static Symbol Private
return Symbol

Property public static property

public static Symbol Property
return Symbol

Protected public static property

Provides access to all derived classes. Implies #protected_in. #protected #internal corresponds to C# "protected internal"
public static Symbol Protected
return Symbol

ProtectedIn public static property

Provides access to derived classes only within the same library or program (i.e. assembly). There is no C# equivalent to this keyword, which does not provide access outside the assembly.
public static Symbol ProtectedIn
return Symbol

PtrArrow public static property

public static Symbol PtrArrow
return Symbol

Public public static property

Provides general access, even outside the assembly (i.e. dynamic-link library). Implies #internal, #protectedIn and #protected.
public static Symbol Public
return Symbol

QuestionMark public static property

public static Symbol QuestionMark
return Symbol

QuickBind public static property

public static Symbol QuickBind
return Symbol

QuickBindAssign public static property

public static Symbol QuickBindAssign
return Symbol

RawText public static property

public static Symbol RawText
return Symbol

Readonly public static property

public static Symbol Readonly
return Symbol

Ref public static property

public static Symbol Ref
return Symbol

Result public static property

public static Symbol Result
return Symbol

Return public static property

public static Symbol Return
return Symbol

Sealed public static property

public static Symbol Sealed
return Symbol

Semicolon public static property

public static Symbol Semicolon
return Symbol

Shl public static property

public static Symbol Shl
return Symbol

ShlAssign public static property

public static Symbol ShlAssign
return Symbol

Shr public static property

public static Symbol Shr
return Symbol

ShrAssign public static property

public static Symbol ShrAssign
return Symbol

Single public static property

public static Symbol Single
return Symbol

Sizeof public static property

public static Symbol Sizeof
return Symbol

Splice public static property

public static Symbol Splice
return Symbol

StackAlloc public static property

public static Symbol StackAlloc
return Symbol

Static public static property

public static Symbol Static
return Symbol

String public static property

public static Symbol String
return Symbol

Struct public static property

public static Symbol Struct
return Symbol

Sub public static property

public static Symbol Sub
return Symbol

SubAssign public static property

public static Symbol SubAssign
return Symbol

Substitute public static property

public static Symbol Substitute
return Symbol

Switch public static property

public static Symbol Switch
return Symbol

This public static property

public static Symbol This
return Symbol

Throw public static property

public static Symbol Throw
return Symbol

Trait public static property

public static Symbol Trait
return Symbol

TriviaAppendStatement public static property

public static Symbol TriviaAppendStatement
return Symbol

TriviaCsPPRawText public static property

public static Symbol TriviaCsPPRawText
return Symbol

TriviaCsRawText public static property

public static Symbol TriviaCsRawText
return Symbol

TriviaDoubleVerbatim public static property

public static Symbol TriviaDoubleVerbatim
return Symbol

TriviaDummyNode public static property

public static Symbol TriviaDummyNode
return Symbol

TriviaForwardedProperty public static property

public static Symbol TriviaForwardedProperty
return Symbol

TriviaInParens public static property

public static Symbol TriviaInParens
return Symbol

TriviaMLComment public static property

public static Symbol TriviaMLComment
return Symbol

TriviaMacroAttribute public static property

public static Symbol TriviaMacroAttribute
return Symbol

TriviaNewline public static property

public static Symbol TriviaNewline
return Symbol

TriviaRawText public static property

public static Symbol TriviaRawText
return Symbol

TriviaSLComment public static property

public static Symbol TriviaSLComment
return Symbol

TriviaSpaces public static property

public static Symbol TriviaSpaces
return Symbol

TriviaTrailing public static property

public static Symbol TriviaTrailing
return Symbol

TriviaUseOperatorKeyword public static property

public static Symbol TriviaUseOperatorKeyword
return Symbol

TriviaWordAttribute public static property

public static Symbol TriviaWordAttribute
return Symbol

Try public static property

public static Symbol Try
return Symbol

Tuple public static property

public static Symbol Tuple
return Symbol

TwoDimensionalArray public static property

public static Symbol TwoDimensionalArray
return Symbol

Typeof public static property

public static Symbol Typeof
return Symbol

UInt16 public static property

public static Symbol UInt16
return Symbol

UInt32 public static property

public static Symbol UInt32
return Symbol

UInt64 public static property

public static Symbol UInt64
return Symbol

UInt8 public static property

public static Symbol UInt8
return Symbol

Unchecked public static property

public static Symbol Unchecked
return Symbol

Unsafe public static property

public static Symbol Unsafe
return Symbol

UsingCast public static property

public static Symbol UsingCast
return Symbol

UsingStmt public static property

public static Symbol UsingStmt
return Symbol

Var public static property

public static Symbol Var
return Symbol

Virtual public static property

public static Symbol Virtual
return Symbol

Void public static property

public static Symbol Void
return Symbol

Volatile public static property

public static Symbol Volatile
return Symbol

Warning public static property

public static Symbol Warning
return Symbol

Where public static property

public static Symbol Where
return Symbol

While public static property

public static Symbol While
return Symbol

Xor public static property

public static Symbol Xor
return Symbol

XorBits public static property

public static Symbol XorBits
return Symbol

XorBitsAssign public static property

public static Symbol XorBitsAssign
return Symbol

Yield public static property

public static Symbol Yield
return Symbol

_AddressOf public static property

public static Symbol _AddressOf
return Symbol

_Bracks public static property

public static Symbol _Bracks
return Symbol

_Concat public static property

public static Symbol _Concat
return Symbol

_Dereference public static property

public static Symbol _Dereference
return Symbol

_Destruct public static property

public static Symbol _Destruct
return Symbol

_HashMark public static property

public static Symbol _HashMark
return Symbol

_Negate public static property

public static Symbol _Negate
return Symbol

_Pointer public static property

public static Symbol _Pointer
return Symbol

_RightArrow public static property

public static Symbol _RightArrow
return Symbol

_TemplateArg public static property

public static Symbol _TemplateArg
return Symbol

_UnaryPlus public static property

public static Symbol _UnaryPlus
return Symbol

add public static property

public static Symbol add
return Symbol

get public static property

public static Symbol get
return Symbol

remove public static property

public static Symbol remove
return Symbol

set public static property

public static Symbol set
return Symbol

value public static property

public static Symbol value
return Symbol