IniFileFrontend
The INI file frontend. This frontend utilizes the ini4j library to parse the config file. The result consists of
a TranslationUnitDeclaration wrapping the entire result
a NamespaceDeclaration wrapping the INI file and thus preventing collisions with other symbols which might have the same name
a RecordDeclaration per
Section
(a section refers to a block of INI values marked with a line[SectionName]
)a FieldDeclaration per entry in a section. The FieldDeclaration.name matches the
entry
sname
field and the FieldDeclaration.initializer is set to a Literal with the correspondingentry
svalue
.
Note:
the "ini4j" library does not provide any super type for all nodes. Thus, the frontend accepts
Any
typeOf has to be implemented, but as there are no types always returns the builtin
string
typecodeOf has to accept
Any
(because of the limitations stated above) and simply returns.toString()
locationOf always returns
null
as the "ini4j" library does not provide any means of getting a location given a nodesetComment not implemented as this is not used (no Handler pattern implemented)
Comments in general are not supported.
Properties
Functions
Returns an approximation of the original code by re-creating (parts of) the INI file given the parsed results provided by ini4j. This is not a perfect representation of the original code (comments, order, ...), however re-parsing it should result in the same CPG-representation.
Return the entire file as the location of any node. The parsing library in use does not provide more fine granular access to a node's location.