Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(887)

Side by Side Diff: regexp2000/src/jsregexp.h

Issue 11203: * Changed string-representation of regexps to handle unprintable chars. (Closed)
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 #define FORWARD_DECLARE(Name) class RegExp##Name; 415 #define FORWARD_DECLARE(Name) class RegExp##Name;
416 FOR_EACH_REG_EXP_TREE_TYPE(FORWARD_DECLARE) 416 FOR_EACH_REG_EXP_TREE_TYPE(FORWARD_DECLARE)
417 #undef FORWARD_DECLARE 417 #undef FORWARD_DECLARE
418 418
419 419
420 class TextElement { 420 class TextElement {
421 public: 421 public:
422 enum Type {UNINITIALIZED, ATOM, CHAR_CLASS}; 422 enum Type {UNINITIALIZED, ATOM, CHAR_CLASS};
423 TextElement() : type(UNINITIALIZED) { } 423 TextElement() : type(UNINITIALIZED) { }
424 TextElement(Type t) : type(t) { } 424 explicit TextElement(Type t) : type(t) { }
425 static TextElement Atom(RegExpAtom* atom); 425 static TextElement Atom(RegExpAtom* atom);
426 static TextElement CharClass(RegExpCharacterClass* char_class); 426 static TextElement CharClass(RegExpCharacterClass* char_class);
427 Type type; 427 Type type;
428 union { 428 union {
429 RegExpAtom* u_atom; 429 RegExpAtom* u_atom;
430 RegExpCharacterClass* u_char_class; 430 RegExpCharacterClass* u_char_class;
431 } data; 431 } data;
432 }; 432 };
433 433
434 434
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 static Handle<FixedArray> Compile(RegExpParseResult* input, 696 static Handle<FixedArray> Compile(RegExpParseResult* input,
697 RegExpNode** node_return, 697 RegExpNode** node_return,
698 bool ignore_case); 698 bool ignore_case);
699 static void DotPrint(const char* label, RegExpNode* node); 699 static void DotPrint(const char* label, RegExpNode* node);
700 }; 700 };
701 701
702 702
703 } } // namespace v8::internal 703 } } // namespace v8::internal
704 704
705 #endif // V8_JSREGEXP_H_ 705 #endif // V8_JSREGEXP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698