Draft: Toml (#1439)

* toml wip

* wip

* Fixed auto parsing toml

* Added build flag not to include toml

* Parse toml docs and tests

* minor updates
This commit is contained in:
Mike Farah
2023-03-26 10:59:15 +11:00
committed by GitHub
parent 47f4ddc910
commit 7103b78d38
16 changed files with 828 additions and 23 deletions
+1 -17
View File
@@ -95,23 +95,7 @@ func (dec *propertiesDecoder) applyProperty(context Context, properties *propert
rhsNode.Tag = guessTagFromCustomType(rhsNode)
rhsCandidateNode := &CandidateNode{
Path: path,
Node: rhsNode,
}
assignmentOp := &Operation{OperationType: assignOpType, Preferences: assignPreferences{}}
rhsOp := &Operation{OperationType: referenceOpType, CandidateNode: rhsCandidateNode}
assignmentOpNode := &ExpressionNode{
Operation: assignmentOp,
LHS: createTraversalTree(path, traversePreferences{}, false),
RHS: &ExpressionNode{Operation: rhsOp},
}
_, err := dec.d.GetMatchingNodes(context, assignmentOpNode)
return err
return dec.d.DeeplyAssign(context, path, rhsNode)
}
func (dec *propertiesDecoder) Decode() (*CandidateNode, error) {