java.lang.Object
dev.civl.abc.ast.IF.StandardTypes
The class collects together the standard type definitions, e.g., size_t,
ptrdiff_t, etc. It provides methods to get the set of all names of these
types, to get the a list of artificially created typedefs for the types, and
to add those typedefs to a scope. The reason for all of this is to provide an
easy way to ignore typedefs in the standard header files and instead use the
symbolic versions of these types provided by the type factory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToScope(Scope scope) Adds typdefs for all of the standard types to the given scope (usually the file scope).Returns the list of typedefs.Returns the names as a collection.
-
Constructor Details
-
StandardTypes
-
-
Method Details
-
addToScope
Adds typdefs for all of the standard types to the given scope (usually the file scope). Each type name is defined to be the type returned by the type factory with the corresponding name.- Parameters:
scope- a static program scope- Throws:
UnsourcedException- if any typedefs with same name are already in the scope
-
getStandardTypeNames
Returns the names as a collection.- Returns:
- set of names of standard types
-
getStandardTypedefs
Returns the list of typedefs.- Returns:
- list of standard typedefs
-