Changeset 18712 in webkit for trunk/JavaScriptCore/kjs/lexer.cpp
- Timestamp:
- Jan 9, 2007, 6:54:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/lexer.cpp
r17862 r18712 32 32 #include <wtf/unicode/Unicode.h> 33 33 34 static bool isDecimalDigit(int); 34 using namespace WTF; 35 using namespace Unicode; 35 36 36 37 // we can't specify the namespace in yacc's C output, so do it here 37 38 using namespace KJS; 38 39 static Lexer *currLexer = 0;40 39 41 40 #ifndef KDE_USE_FINAL … … 53 52 return Lexer::curr()->lex(); 54 53 } 54 55 namespace KJS { 56 57 static Lexer* currLexer = 0; 58 59 static bool isDecimalDigit(int); 55 60 56 61 Lexer::Lexer() … … 566 571 bool Lexer::isWhiteSpace() const 567 572 { 568 return current == '\t' || current == 0x0b || current == 0x0c || WTF::Unicode::isSeparatorSpace(current);573 return current == '\t' || current == 0x0b || current == 0x0c || isSeparatorSpace(current); 569 574 } 570 575 … … 582 587 bool Lexer::isIdentStart(int c) 583 588 { 584 return (WTF::Unicode::category(c) & (WTF::Unicode::Letter_Uppercase 585 | WTF::Unicode::Letter_Lowercase 586 | WTF::Unicode::Letter_Titlecase 587 | WTF::Unicode::Letter_Modifier 588 | WTF::Unicode::Letter_Other)) 589 return (category(c) & (Letter_Uppercase | Letter_Lowercase | Letter_Titlecase | Letter_Modifier | Letter_Other)) 589 590 || c == '$' || c == '_'; 590 591 } … … 592 593 bool Lexer::isIdentPart(int c) 593 594 { 594 return (WTF::Unicode::category(c) & (WTF::Unicode::Letter_Uppercase 595 | WTF::Unicode::Letter_Lowercase 596 | WTF::Unicode::Letter_Titlecase 597 | WTF::Unicode::Letter_Modifier 598 | WTF::Unicode::Letter_Other 599 | WTF::Unicode::Mark_NonSpacing 600 | WTF::Unicode::Mark_SpacingCombining 601 | WTF::Unicode::Number_DecimalDigit 602 | WTF::Unicode::Punctuation_Connector)) 595 return (category(c) & (Letter_Uppercase | Letter_Lowercase | Letter_Titlecase | Letter_Modifier | Letter_Other 596 | Mark_NonSpacing | Mark_SpacingCombining | Number_DecimalDigit | Punctuation_Connector)) 603 597 || c == '$' || c == '_'; 604 598 } … … 912 906 return string; 913 907 } 908 909 }
Note:
See TracChangeset
for help on using the changeset viewer.