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

Side by Side Diff: sky/engine/core/html/parser/MarkupTokenizerInlines.h

Issue 719063002: Revert "Remove support for MSVC" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/
4 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 4 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 while (*expectedCharacters) 53 while (*expectedCharacters)
54 source.advanceAndASSERTIgnoringCase(*expectedCharacters++); 54 source.advanceAndASSERTIgnoringCase(*expectedCharacters++);
55 } 55 }
56 56
57 inline void advanceStringAndASSERT(SegmentedString& source, const char* expected Characters) 57 inline void advanceStringAndASSERT(SegmentedString& source, const char* expected Characters)
58 { 58 {
59 while (*expectedCharacters) 59 while (*expectedCharacters)
60 source.advanceAndASSERT(*expectedCharacters++); 60 source.advanceAndASSERT(*expectedCharacters++);
61 } 61 }
62 62
63 #if COMPILER(MSVC)
64 // We need to disable the "unreachable code" warning because we want to assert
65 // that some code points aren't reached in the state machine.
66 #pragma warning(disable: 4702)
67 #endif
68
63 #define BEGIN_STATE(prefix, stateName) case prefix::stateName: stateName: 69 #define BEGIN_STATE(prefix, stateName) case prefix::stateName: stateName:
64 #define END_STATE() ASSERT_NOT_REACHED(); break; 70 #define END_STATE() ASSERT_NOT_REACHED(); break;
65 71
66 // We use this macro when the HTML5 spec says "reconsume the current input 72 // We use this macro when the HTML5 spec says "reconsume the current input
67 // character in the <mumble> state." 73 // character in the <mumble> state."
68 #define RECONSUME_IN(prefix, stateName) \ 74 #define RECONSUME_IN(prefix, stateName) \
69 do { \ 75 do { \
70 m_state = prefix::stateName; \ 76 m_state = prefix::stateName; \
71 goto stateName; \ 77 goto stateName; \
72 } while (false) 78 } while (false)
(...skipping 18 matching lines...) Expand all
91 m_state = prefix::stateName; \ 97 m_state = prefix::stateName; \
92 if (source.isEmpty() || !m_inputStreamPreprocessor.peek(source)) \ 98 if (source.isEmpty() || !m_inputStreamPreprocessor.peek(source)) \
93 return haveBufferedCharacterToken(); \ 99 return haveBufferedCharacterToken(); \
94 cc = m_inputStreamPreprocessor.nextInputCharacter(); \ 100 cc = m_inputStreamPreprocessor.nextInputCharacter(); \
95 goto stateName; \ 101 goto stateName; \
96 } while (false) 102 } while (false)
97 103
98 } 104 }
99 105
100 #endif // MarkupTokenizerInlines_h 106 #endif // MarkupTokenizerInlines_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698