Update
This commit is contained in:
@ -60,12 +60,12 @@ enum Constant {
|
||||
/**
|
||||
Represents an integer literal.
|
||||
**/
|
||||
CInt(v:String);
|
||||
CInt(v:String, ?s:String);
|
||||
|
||||
/**
|
||||
Represents a float literal.
|
||||
**/
|
||||
CFloat(f:String);
|
||||
CFloat(f:String, ?s:String);
|
||||
|
||||
/**
|
||||
Represents a string literal.
|
||||
@ -214,6 +214,11 @@ enum Binop {
|
||||
`in`
|
||||
**/
|
||||
OpIn;
|
||||
|
||||
/**
|
||||
`??`
|
||||
**/
|
||||
OpNullCoal;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,6 +257,11 @@ enum Unop {
|
||||
OpSpread;
|
||||
}
|
||||
|
||||
enum EFieldKind {
|
||||
Normal;
|
||||
Safe;
|
||||
}
|
||||
|
||||
/**
|
||||
Represents a node in the AST.
|
||||
@see https://haxe.org/manual/macro-reification-expression.html
|
||||
@ -306,6 +316,11 @@ typedef Var = {
|
||||
**/
|
||||
var name:String;
|
||||
|
||||
/**
|
||||
The position of the variable name.
|
||||
**/
|
||||
var ?namePos:Position;
|
||||
|
||||
/**
|
||||
The type-hint of the variable, if available.
|
||||
**/
|
||||
@ -321,6 +336,11 @@ typedef Var = {
|
||||
**/
|
||||
var ?isFinal:Bool;
|
||||
|
||||
/**
|
||||
Whether or not the variable is static.
|
||||
**/
|
||||
var ?isStatic:Bool;
|
||||
|
||||
/**
|
||||
Metadata associatied with the variable, if available.
|
||||
**/
|
||||
@ -424,8 +444,10 @@ enum ExprDef {
|
||||
|
||||
/**
|
||||
Field access on `e.field`.
|
||||
|
||||
If `kind` is null, it is equal to Normal.
|
||||
**/
|
||||
EField(e:Expr, field:String);
|
||||
EField(e:Expr, field:String, ?kind:EFieldKind);
|
||||
|
||||
/**
|
||||
Parentheses `(e)`.
|
||||
@ -545,11 +567,6 @@ enum ExprDef {
|
||||
**/
|
||||
EDisplay(e:Expr, displayKind:DisplayKind);
|
||||
|
||||
/**
|
||||
Used internally to provide completion.
|
||||
**/
|
||||
EDisplayNew(t:TypePath);
|
||||
|
||||
/**
|
||||
A `(econd) ? eif : eelse` expression.
|
||||
**/
|
||||
@ -681,6 +698,11 @@ typedef TypeParamDecl = {
|
||||
**/
|
||||
var ?constraints:Array<ComplexType>;
|
||||
|
||||
/**
|
||||
The optional default type of the type parameter.
|
||||
**/
|
||||
var ?defaultType:Null<ComplexType>;
|
||||
|
||||
/**
|
||||
The optional parameters of the type parameter.
|
||||
**/
|
||||
@ -977,7 +999,7 @@ enum TypeDefKind {
|
||||
/**
|
||||
Represents an abstract kind.
|
||||
**/
|
||||
TDAbstract(tthis:Null<ComplexType>, ?from:Array<ComplexType>, ?to:Array<ComplexType>);
|
||||
TDAbstract(tthis:Null<ComplexType>, ?flags:Array<AbstractFlag>, ?from:Array<ComplexType>, ?to:Array<ComplexType>);
|
||||
|
||||
/**
|
||||
Represents a module-level field.
|
||||
@ -985,6 +1007,28 @@ enum TypeDefKind {
|
||||
TDField(kind:FieldType, ?access:Array<Access>); // ignore TypeDefinition.fields
|
||||
}
|
||||
|
||||
/**
|
||||
Represents an abstract flag.
|
||||
**/
|
||||
enum AbstractFlag {
|
||||
/**
|
||||
Indicates that this abstract is an `enum abstract`
|
||||
**/
|
||||
AbEnum;
|
||||
|
||||
/**
|
||||
Indicates that this abstract can be assigned from `ct`.
|
||||
This flag can be added several times to add multiple "from" types.
|
||||
**/
|
||||
AbFrom(ct:ComplexType);
|
||||
|
||||
/**
|
||||
Indicates that this abstract can be assigned to `ct`.
|
||||
This flag can be added several times to add multiple "to" types.
|
||||
**/
|
||||
AbTo(ct:ComplexType);
|
||||
}
|
||||
|
||||
/**
|
||||
This error can be used to handle or produce compilation errors in macros.
|
||||
**/
|
||||
@ -994,6 +1038,11 @@ class Error extends Exception {
|
||||
**/
|
||||
public var pos:Position;
|
||||
|
||||
/**
|
||||
Child error messages, if any.
|
||||
**/
|
||||
private var childErrors:Array<Error>;
|
||||
|
||||
/**
|
||||
Instantiates an error with given message and position.
|
||||
**/
|
||||
|
||||
Reference in New Issue
Block a user