Lines Matching refs:body
96 body = []
100 body << "#{indent}if (attribute == \"#{attribute_name(a)}\") {"
103 body << "#{indent * 2}if (HasAttribute(attribute)) {"
104 body << "#{indent * 3}return Error(\"Attribute '#{attribute_name(a)}' already defined\","
105 body << "#{indent * 3} Error::Type::MULTIPLE_ATTRIBUTE);"
106 body << "#{indent * 2}}"
111 body << "#{indent * 2}if (value == \"#{v.value}\") {"
112 body << "#{indent * 3}return {};"
113 body << "#{indent * 2}}"
114 body << ""
117 …body << "#{indent * 2}return Error(std::string(\"Attribute '#{attribute_name(a)}' have incorrect v…
118 …body << "#{indent * 2} R\"('. Should be one of #{a.values.map(&:value)})\", Error::Typ…
120 body << "#{indent * 2}return ValidateSize(value);"
122 body << "#{indent * 2}return {};"
125 body << "#{indent}}"
126 body << ""
130 body << "#{indent}if (attribute == \"#{attribute_name(a)}\") {"
131 …body << "#{indent * 2}return Error(\"Attribute '#{attribute_name(a)}' #{is_bool ? "must" : "must n…
132 …body << "#{indent * 2} #{is_bool ? "Error::Type::MISSING_VALUE" : "Error::Type::UNEXPE…
133 body << "#{indent}}"
134 body << ""
140 body << "#{indent}return pandasm::#{class_name(item_type)}::Validate(#{args.join(', ')});"
142 … body << "#{indent}return Error(std::string(\"Unknown attribute '\").append(attribute) + \"'\","
143 body << "#{indent} Error::Type::UNKNOWN_ATTRIBUTE);"
146 body
151 body = []
155 body << "#{indent}if (attribute == \"#{attribute_name(a)}\") {"
158 body << "#{indent * 2}SetAccessFlags(GetAccessFlags() | #{a.flags.join(' | ')});"
163 body << "#{indent * 2}if (value == \"#{v.value}\") {"
164 body << "#{indent * 3}SetAccessFlags(GetAccessFlags() | #{v.flags.join(' | ')});"
165 body << "#{indent * 2}}"
166 body << ""
170 body << "#{indent}}"
176 body << "#{indent}pandasm::#{class_name(item_type)}::SetFlags(#{args.join(', ')});"
179 body
184 body = []
188 body << "#{indent}if (attribute == \"#{attribute_name(a)}\") {"
191 body << "#{indent * 2}if ((GetAccessFlags() & #{a.flags.join(' | ')}) != 0) {"
192 body << "#{indent * 3}SetAccessFlags(GetAccessFlags() ^ (#{a.flags.join(' | ')}));"
193 body << "#{indent * 2}}"
198 body << "#{indent * 2}if (value == \"#{v.value}\") {"
199 body << "#{indent * 3}if ((GetAccessFlags() & (#{v.flags.join(' | ')})) != 0) {"
200 body << "#{indent * 4}SetAccessFlags(GetAccessFlags() ^ (#{v.flags.join(' | ')}));"
201 body << "#{indent * 3}}"
202 body << "#{indent * 2}}"
206 body << "#{indent}}"
212 body << "#{indent}pandasm::#{class_name(item_type)}::RemoveFlags(#{args.join(', ')});"
215 body