cdefa254c9
Although the actual parsing code will be split across multiple packages, it's convenient for the public interface to be in a single package. The parsers are accessed through a "Parser" type, which both wraps the real parsers and maintains a registry of parsed files to ensure that the same file isn't parsed more than once (which might be confusing if there are different results) and to provide raw source code for diagnostic-printing functions. The parser API is in a separate package both due to the fundamental problem that it would create an import cycle if included in the main package and also because it's expected that calling applications will deal with parsing once in a central place (a single file depending on zclparse) but the resulting objects will be used broadly across the application, causing many files to depend on the main zcl package. |
||
---|---|---|
.. | ||
parser.go |