MCPcopy Create free account
hub / github.com/argotorg/solidity / validateObjectStructure

Method validateObjectStructure

libyul/AsmAnalysis.cpp:933–958  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933void AsmAnalyzer::validateObjectStructure(langutil::SourceLocation const& _astRootLocation)
934{
935 if (m_eofVersion.has_value())
936 {
937 if (util::contains(m_objectStructure.objectName, '.')) // No dots in object name for EOF
938 m_errorReporter.syntaxError(
939 9822_error,
940 _astRootLocation,
941 fmt::format(
942 "The object name \"{objectName}\" is invalid in EOF context. Object names must not contain 'dot' character.",
943 fmt::arg("objectName", m_objectStructure.objectName)
944 )
945 );
946 else if (m_objectStructure.topLevelSubObjectNames().size() > 256)
947 {
948 m_errorReporter.syntaxError(
949 1305_error,
950 _astRootLocation,
951 fmt::format(
952 "Too many subobjects in \"{objectName}\". At most 256 subobjects allowed when compiling to EOF",
953 fmt::arg("objectName", m_objectStructure.objectName)
954 )
955 );
956 }
957 }
958}
959
960void AsmAnalyzer::warnIfFutureKeywordOrReservedIdentifier(YulName _identifier, langutil::SourceLocation const& _location)
961{

Callers

nothing calls this directly

Calls 4

containsFunction · 0.85
syntaxErrorMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected