|
@@ -1648,10 +1648,10 @@ tokens Scanner<EncodingPolicy>::ScanStringConstant(OLECHAR delim, EncodedCharPtr
|
|
|
template<typename EncodingPolicy>
|
|
template<typename EncodingPolicy>
|
|
|
tokens Scanner<EncodingPolicy>::ScanAnnotations(EncodedCharPtr *pp)
|
|
tokens Scanner<EncodingPolicy>::ScanAnnotations(EncodedCharPtr *pp)
|
|
|
{
|
|
{
|
|
|
- EncodedCharPtr p = *pp;
|
|
|
|
|
- EncodedCharPtr last = m_pchLast;
|
|
|
|
|
- OLECHAR ch;
|
|
|
|
|
- //FCASTE: IMPORTANT
|
|
|
|
|
|
|
+ EncodedCharPtr p = *pp;
|
|
|
|
|
+ EncodedCharPtr last = m_pchLast;
|
|
|
|
|
+ OLECHAR ch;
|
|
|
|
|
+ //FCASTE: IMPORTANT
|
|
|
for (;;)
|
|
for (;;)
|
|
|
{
|
|
{
|
|
|
switch ((ch = this->ReadFirst(p, last)))
|
|
switch ((ch = this->ReadFirst(p, last)))
|
|
@@ -1687,48 +1687,48 @@ tokens Scanner<EncodingPolicy>::ScanAnnotations(EncodedCharPtr *pp)
|
|
|
default:
|
|
default:
|
|
|
Error(ERRsyntax);
|
|
Error(ERRsyntax);
|
|
|
}
|
|
}
|
|
|
- case kchLS: // 0x2028, classifies as new line
|
|
|
|
|
- case kchPS: // 0x2029, classifies as new line
|
|
|
|
|
- LEcmaLineBreak:
|
|
|
|
|
- goto LLineBreak;
|
|
|
|
|
-
|
|
|
|
|
- case kchRET:
|
|
|
|
|
- case kchNWL:
|
|
|
|
|
- LLineBreak:
|
|
|
|
|
- m_fHadEol = TRUE;
|
|
|
|
|
- m_currentCharacter = p;
|
|
|
|
|
- ScanNewLine(ch);
|
|
|
|
|
- p = m_currentCharacter;
|
|
|
|
|
- break;
|
|
|
|
|
-
|
|
|
|
|
- case kchNUL:
|
|
|
|
|
- if (p >= last)
|
|
|
|
|
- {
|
|
|
|
|
- m_currentCharacter = p - 1;
|
|
|
|
|
- *pp = p - 1;
|
|
|
|
|
- if (m_fSyntaxColor)
|
|
|
|
|
- {
|
|
|
|
|
- m_scanState = ScanStateMultiLineComment;
|
|
|
|
|
- return tkComment;
|
|
|
|
|
- }
|
|
|
|
|
- Error(ERRnoCmtEnd);
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
-
|
|
|
|
|
- default:
|
|
|
|
|
- if (this->IsMultiUnitChar(ch))
|
|
|
|
|
- {
|
|
|
|
|
- ch = this->template ReadRest<true>(ch, p, last);
|
|
|
|
|
- switch (ch)
|
|
|
|
|
- {
|
|
|
|
|
- case kchLS:
|
|
|
|
|
- case kchPS:
|
|
|
|
|
- goto LEcmaLineBreak;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ case kchLS: // 0x2028, classifies as new line
|
|
|
|
|
+ case kchPS: // 0x2029, classifies as new line
|
|
|
|
|
+ LEcmaLineBreak:
|
|
|
|
|
+ goto LLineBreak;
|
|
|
|
|
+
|
|
|
|
|
+ case kchRET:
|
|
|
|
|
+ case kchNWL:
|
|
|
|
|
+ LLineBreak:
|
|
|
|
|
+ m_fHadEol = TRUE;
|
|
|
|
|
+ m_currentCharacter = p;
|
|
|
|
|
+ ScanNewLine(ch);
|
|
|
|
|
+ p = m_currentCharacter;
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ case kchNUL:
|
|
|
|
|
+ if (p >= last)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_currentCharacter = p - 1;
|
|
|
|
|
+ *pp = p - 1;
|
|
|
|
|
+ if (m_fSyntaxColor)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_scanState = ScanStateMultiLineComment;
|
|
|
|
|
+ return tkComment;
|
|
|
|
|
+ }
|
|
|
|
|
+ Error(ERRnoCmtEnd);
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ default:
|
|
|
|
|
+ if (this->IsMultiUnitChar(ch))
|
|
|
|
|
+ {
|
|
|
|
|
+ ch = this->template ReadRest<true>(ch, p, last);
|
|
|
|
|
+ switch (ch)
|
|
|
|
|
+ {
|
|
|
|
|
+ case kchLS:
|
|
|
|
|
+ case kchPS:
|
|
|
|
|
+ goto LEcmaLineBreak;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
/*****************************************************************************
|
|
@@ -1743,7 +1743,7 @@ tokens Scanner<EncodingPolicy>::SkipComment(EncodedCharPtr *pp, /* out */ bool*
|
|
|
*containTypeDef = false;
|
|
*containTypeDef = false;
|
|
|
EncodedCharPtr last = m_pchLast;
|
|
EncodedCharPtr last = m_pchLast;
|
|
|
OLECHAR ch;
|
|
OLECHAR ch;
|
|
|
- //FCASTE: IMPORTANT
|
|
|
|
|
|
|
+ //FCASTE: IMPORTANT
|
|
|
for (;;)
|
|
for (;;)
|
|
|
{
|
|
{
|
|
|
switch((ch = this->ReadFirst(p, last)))
|
|
switch((ch = this->ReadFirst(p, last)))
|
|
@@ -2179,7 +2179,7 @@ LIdentifier:
|
|
|
Assert(chType == _C_RC);
|
|
Assert(chType == _C_RC);
|
|
|
token = tkRCurly;
|
|
token = tkRCurly;
|
|
|
break;
|
|
break;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
case '\\':
|
|
case '\\':
|
|
|
pchT = p - 1;
|
|
pchT = p - 1;
|
|
|
token = ScanIdentifier(identifyKwds, &pchT);
|
|
token = ScanIdentifier(identifyKwds, &pchT);
|