1 /* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include "layout_validation.h" 18 19 #include "android-base/stringprintf.h" 20 21 namespace startop { 22 VisitStartTag(const std::u16string & name)23void LayoutValidationVisitor::VisitStartTag(const std::u16string& name) { 24 if (0 == name.compare(u"merge")) { 25 message_ = "Merge tags are not supported"; 26 can_compile_ = false; 27 } 28 if (0 == name.compare(u"include")) { 29 message_ = "Include tags are not supported"; 30 can_compile_ = false; 31 } 32 if (0 == name.compare(u"view")) { 33 message_ = "View tags are not supported"; 34 can_compile_ = false; 35 } 36 if (0 == name.compare(u"fragment")) { 37 message_ = "Fragment tags are not supported"; 38 can_compile_ = false; 39 } 40 } 41 42 } // namespace startop