This commit is contained in:
Hackerpilot 2013-06-22 17:47:17 +00:00
commit 38105d542f
3 changed files with 688 additions and 351 deletions

View File

@ -305,8 +305,8 @@ class AndExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */AndExpression andExpression;
/** */ShiftExpression shiftExpression;
/** */ AndExpression left;
/** */ CmpExpression right;
}
///
@ -355,8 +355,8 @@ class AsmAddExp : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */Token operator;
/** */AsmMulExp left;
/** */ TokenType operator;
/** */ AsmAddExp left;
/** */ AsmMulExp right;
}
@ -433,9 +433,10 @@ class AsmMulExp : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */AsmBrExp left;
/** */ TokenType operator;
/** */ AsmMulExp left;
/** */ AsmBrExp right;
/** */Token operator;
}
///
@ -991,7 +992,9 @@ class EqualExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
mixin(SHIFT_SHIFT_BODY);
/** */ TokenType operator;
/** */ ShiftExpression left;
/** */ ShiftExpression right;
}
///
@ -999,7 +1002,7 @@ class Expression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ AssignExpression[] assignExpressions;
/** */ AssignExpression[] items;
}
///
@ -1140,8 +1143,7 @@ class GotoStatement : ASTNode
public:
mixin(DEFAULT_ACCEPT);
/** */ Expression expression;
/** */ Token identifier;
/** */ bool isDefault;
/** */ Token token;
}
///
@ -1182,7 +1184,9 @@ class IdentityExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
mixin(SHIFT_SHIFT_BODY);
/** */ bool negated;
/** */ ShiftExpression left;
/** */ ShiftExpression right;
}
///
@ -1320,7 +1324,8 @@ class KeyValuePair : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ KeyValuePair[] keyValuePairs;
/** */ AssignExpression key;
/** */ AssignExpression value;
}
///
@ -1328,8 +1333,7 @@ class KeyValuePairs : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ AssignExpression key;
/** */ AssignExpression value;
/** */ KeyValuePair[] keyValuePairs;
}
///
@ -1433,8 +1437,8 @@ class MulExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ Token operator;
/** */ UnaryExpression left;
/** */ TokenType operator;
/** */ MulExpression left;
/** */ UnaryExpression right;
}
@ -1445,10 +1449,8 @@ public:
mixin(DEFAULT_ACCEPT);
/** */ Arguments allocatorArguments;
/** */ Arguments constructorArguments;
/** */ IdentifierList identifierList;
/** */ ClassBody ///
classBody;
/** */ BaseClassList baseClassList;
/** */ ClassBody classBody;
}
///
@ -1541,8 +1543,8 @@ class OrExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ XorExpression xorExpression;
/** */ OrExpression orExpression;
/** */ OrExpression left;
/** */ XorExpression right;
}
///
@ -1550,8 +1552,8 @@ class OrOrExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ OrOrExpression orOrExpression;
/** */ AndAndExpression andAndExpression;
/** */ OrOrExpression left;
/** */ AndAndExpression right;
}
///
@ -1614,8 +1616,8 @@ class PowExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ UnaryExpression unaryExpression;
/** */ PowExpression powExpression;
/** */ PowExpression left;
/** */ UnaryExpression right;
}
///
@ -1650,20 +1652,19 @@ class PrimaryExpression : ASTNode
public:
mixin(DEFAULT_ACCEPT);
/** */ Token primary;
/** */ bool hasDot;
IdentifierOrTemplateInstance identifierOrTemplateInstance;
Type type;
TypeofExpression typeofExpression;
TypeidExpression typeidExpression;
ArrayLiteral arrayLiteral;
AssocArrayLiteral assocArrayLiteral;
Expression expression;
IsExpression isExpression;
LambdaExpression lambdaExpression;
FunctionLiteralExpression functionLiteralExpression;
TraitsExpression traitsExpression;
MixinExpression mixinExpression;
ImportExpression importExpression;
/** */ IdentifierOrTemplateInstance identifierOrTemplateInstance;
/** */ Type type;
/** */ TypeofExpression typeofExpression;
/** */ TypeidExpression typeidExpression;
/** */ ArrayLiteral arrayLiteral;
/** */ AssocArrayLiteral assocArrayLiteral;
/** */ Expression expression;
/** */ IsExpression isExpression;
/** */ LambdaExpression lambdaExpression;
/** */ FunctionLiteralExpression functionLiteralExpression;
/** */ TraitsExpression traitsExpression;
/** */ MixinExpression mixinExpression;
/** */ ImportExpression importExpression;
}
///
@ -1681,7 +1682,9 @@ class RelExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
mixin(SHIFT_SHIFT_BODY);
/** */ TokenType operator;
/** */ RelExpression left;
/** */ ShiftExpression right;
}
///
@ -1722,9 +1725,9 @@ class ShiftExpression : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ AddExpression addExpression;
/** */ ShiftExpression shiftExpression;
/** */ Token operator;
/** */ TokenType operator;
/** */ ShiftExpression left;
/** */ AddExpression right;
}
///

View File

@ -2220,7 +2220,7 @@ private:
// For now a private helper that is tailored to the way lexer works
// hides away forwardness of range by buffering
// RA-version is strightforward thin wrapping
// random-access version is a strightforward thin wrapping
// ATM it is byte-oriented
private struct LexSource(R)
if(isForwardRange!R && !isRandomAccessRange!R)
@ -3038,8 +3038,7 @@ struct StringCache
index = new Slot*[startSize];
}
string get(R)(R range)
if(isRandomAccessRange!R
string get(R)(R range) if (isRandomAccessRange!R
&& is(Unqual!(ElementType!R) : const(ubyte)))
{
uint h = hash(range);
@ -3052,7 +3051,7 @@ struct StringCache
uniqueSlots++;
return str;
}
for(;;)
while (true)
{
if(s.hash == h && s.value.equal(range))
return s.value;

File diff suppressed because it is too large Load Diff