Open
Description
The following language features must be supported before this can really be usable. Tracking of the syntax support is done below.
- Comments
- line comments
// comment
- block comments
/* blah */
- doc comments
/** doc */
- start / end
-
<<BR>>
newlines -
''bold''
-
//italic//
-
__underlined__
- two-backticks for block quotes
- allows nested inline modifiers
- numbered lists using numbers
1.
- numbered lists using
#
- numbered lists using
i.
- numbered lists using
I.
- alphabetical lists using
a.
- alphabetical lists using
A.
- unordered lists using
*
- nested lists
- code blocks
- links
- images
- tables
- headlines
- inline taglets
-
{@inheritDoc}
-
{@link [node]}
-
- block taglets
-
@deprecated [version]
-
@see [node-name]
-
@param [name] [description]
-
@since [version]
-
@return [description]
-
@throws [type] [description]
-
- line comments
- Type Keywords
- booleans
- integers
- floats
- strings
- Operators
- assignment
- bitwise
- bitwise-shift
- relational
- logical
- coalescing
- ternary
- class/array (
new
) instantiation (example) -
in
flag operator (example — only valid in loops) -
is
type operator (example) -
as
type operator (example) -
sizeof
(example) -
typeof
(example) -
=>
lambda operator (example) -
->
pointer operator -
global::
- array indicies / subscripts
- commas
- semicolon
- ellipsis parameter (only valid in method definitions)
-
delete
- slice
[:]
- ownership transfer
(owned)
- parenthesis
- brackets
- Primitive Literals
- integers
- floats
-
true
andfalse
-
null
- single-line strings
- single-line string escapes
- verbatim strings
- string templates:
@"$a * $b = $(a * b)"
- Variables
- declaration with explicit type
- declaration with explicit type and initializer
- declaration with type inference
-
var
- identifiers
-
@
-prefixed identifiers - storage modifiers
- index operators (subscript) on variables
- Blocks
- statements surrounded by
{ ... }
- statements surrounded by
- Selection Statements
-
if
-
else if
-
else
-
switch
, - switch
case
- switch
default
-
- Iteration Statements
-
while
-
do...while
-
for
-
foreach...in
-
- Jump Statements
-
break
-
continue
-
return
-
throw
-
- Try Statement
-
try
-
- Lock Statement
- Namespaces
-
namespace
- recursive
- nested naming
Namespace1.Namespace2
- members
- access modifiers
public
,private
- field declaration
- constants
const
-
using
statements -
global::
references - only allows
namespace-members
as the body:- class declarations
- abstract-classes declarations
- constant declarations
- delegate declarations
- enum declarations
- errordomain declarations
- field declarations
- interface declarations
- method declarations
- namespace declarations
- struct declaractions
-
- Member access
- dot-access
x.member
-
this
keyword - works on all expressions
- pointer access
ptr->member
- access via element indicies
- dot-access
- Method Calls
- normal calls
-
.
member calls -
->
member calls
- Lambdas
-
params => body
- providing direction on parameters:
out
,ref
- named parameters
-
- Methods
- storage modifiers
- nullable return types
- fully-qualified method names
- storage modifiers
- directional parameter qualifiers
- nullable parameter types
- user parameter types
- user return types
- default values
-
...
operator -
throws
-
requires
-
ensures
- Structs
- instantiation
- initializing field values
- Arrays
-
new
instantiation - providing
sizes
and initialization expressions - subscripts
-
- Enums
- Methods
- storage modifiers
-
yield
expression (note: after function calls)
- Delegates
-
yield
expression (note: after function calls)
-
- Errors
- Signals
-
yield
expression
-
- Generics
- Classes
-
new
instantiation - subclasses
-