parse_panel#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- scenet.frontends.yaml_front.parse_panel(text, *, source=None)[source]#
Parse panel source into validated IR, without compiling it.
What
compile_sourcedoes first: everything an author can get wrong is found here, and nothing is placed.- Parameters:
- Return type:
- Returns:
The validated scene graph. No coordinates yet – that is the solver’s job.
- Raises:
PanelSyntaxError – The document is malformed or invalid, with each fault’s place.
Note
A puppet the cast names is not looked up here, and a file the document names is not read: both are the compile’s. A document with
panels:is refused.Example
>>> from scenet import parse_panel >>> panel = parse_panel("cast: {a: {reference: alice, at: left_third}}") >>> panel.cast["a"].at <AnchorX.LEFT_THIRD: 'left_third'>
See also
compile_ir, to compile what it returns.load_panel, to read a file.