@nfdi4plants/arctrl 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ts/index.d.ts +44 -7
- package/dist/ts/index.d.ts.map +1 -1
- package/dist/ts/index.js +45 -8
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Array.js +195 -92
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Async.js +251 -30
- package/dist/ts/node_modules/@fable-org/fable-library-ts/AsyncBuilder.js +61 -11
- package/dist/ts/node_modules/@fable-org/fable-library-ts/BigInt.js +15 -5
- package/dist/ts/node_modules/@fable-org/fable-library-ts/BitConverter.js +139 -0
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Date.js +1 -1
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Decimal.js +68 -12
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Double.js +24 -10
- package/dist/ts/node_modules/@fable-org/fable-library-ts/FSharp.Core.js +8 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Global.js +1 -1
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Int32.js +11 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/List.js +220 -155
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Long.js +7 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Map.js +46 -39
- package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableMap.js +75 -92
- package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableSet.js +56 -76
- package/dist/ts/node_modules/@fable-org/fable-library-ts/NumberStyles.js +54 -0
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Numeric.js +10 -5
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Random.js +3 -4
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Range.js +4 -3
- package/dist/ts/node_modules/@fable-org/fable-library-ts/RegExp.js +2 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq.js +128 -64
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq2.js +4 -8
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Set.js +64 -57
- package/dist/ts/node_modules/@fable-org/fable-library-ts/String.js +68 -21
- package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Collections.Generic.js +3 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Text.js +2 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/System.js +5 -5
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Types.js +23 -12
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Util.js +88 -49
- package/dist/ts/node_modules/@fable-org/fable-library-ts/lib/big.js +121 -74
- package/dist/ts/ts/ARC.d.ts +19 -2
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +128 -89
- package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts +0 -2
- package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts.map +1 -1
- package/dist/ts/ts/CWL/CWLKnownFieldNames.js +1 -7
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +46 -27
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -1
- package/dist/ts/ts/CWL/CWLProcessingUnit.js +312 -123
- package/dist/ts/ts/CWL/CWLTypes.d.ts +481 -148
- package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -1
- package/dist/ts/ts/CWL/CWLTypes.js +887 -201
- package/dist/ts/ts/CWL/Decode.d.ts +480 -211
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Decode.js +3614 -2462
- package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts +9 -0
- package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts.map +1 -1
- package/dist/ts/ts/CWL/DynamicObjHelpers.js +55 -5
- package/dist/ts/ts/CWL/Encode.d.ts +225 -85
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Encode.js +1858 -970
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +42 -28
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ExpressionToolDescription.js +34 -13
- package/dist/ts/ts/CWL/HashHelpers.d.ts +38 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -1
- package/dist/ts/ts/CWL/HashHelpers.js +255 -6
- package/dist/ts/ts/CWL/Inputs.d.ts +127 -56
- package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Inputs.js +107 -16
- package/dist/ts/ts/CWL/OperationDescription.d.ts +41 -21
- package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/OperationDescription.js +35 -9
- package/dist/ts/ts/CWL/Outputs.d.ts +93 -42
- package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Outputs.js +101 -19
- package/dist/ts/ts/CWL/ParameterReference.d.ts +11 -8
- package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ParameterReference.js +18 -25
- package/dist/ts/ts/CWL/ParameterValue.d.ts +15 -1
- package/dist/ts/ts/CWL/ParameterValue.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ParameterValue.js +59 -35
- package/dist/ts/ts/CWL/Requirements.d.ts +240 -98
- package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Requirements.js +462 -89
- package/dist/ts/ts/CWL/ScalarQuoting.d.ts +51 -0
- package/dist/ts/ts/CWL/ScalarQuoting.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ScalarQuoting.js +250 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts +63 -50
- package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ToolDescription.js +34 -13
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts +45 -26
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/WorkflowDescription.js +38 -11
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +248 -65
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -1
- package/dist/ts/ts/CWL/WorkflowSteps.js +413 -43
- package/dist/ts/ts/CWLRunResolver.d.ts +30 -12
- package/dist/ts/ts/CWLRunResolver.d.ts.map +1 -1
- package/dist/ts/ts/CWLRunResolver.js +221 -86
- package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ARC.js +13 -14
- package/dist/ts/ts/Contract/ArcAssay.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcAssay.js +4 -4
- package/dist/ts/ts/Contract/ArcInvestigation.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcInvestigation.js +3 -4
- package/dist/ts/ts/Contract/ArcRun.d.ts +12 -2
- package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcRun.js +47 -20
- package/dist/ts/ts/Contract/ArcStudy.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcStudy.js +4 -4
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts +18 -4
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcWorkflow.js +55 -17
- package/dist/ts/ts/Contract/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Contract/Datamap.js +16 -17
- package/dist/ts/ts/Contract/Git.js +1 -1
- package/dist/ts/ts/Contract/ValidationPackagesConfig.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ValidationPackagesConfig.js +4 -5
- package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/ContractIO.js +15 -16
- package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Assay.js +26 -18
- package/dist/ts/ts/Conversion/Basic.d.ts +4 -0
- package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Basic.js +55 -31
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/ColumnIndex.js +2 -4
- package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/DateTime.js +1 -2
- package/dist/ts/ts/Conversion/Investigation.js +11 -11
- package/dist/ts/ts/Conversion/Person.js +11 -11
- package/dist/ts/ts/Conversion/Process.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Process.js +107 -86
- package/dist/ts/ts/Conversion/Run.d.ts +36 -6
- package/dist/ts/ts/Conversion/Run.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Run.js +320 -136
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/ScholarlyArticle.js +75 -9
- package/dist/ts/ts/Conversion/Study.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Study.js +23 -12
- package/dist/ts/ts/Conversion/Table.js +5 -5
- package/dist/ts/ts/Conversion/Workflow.d.ts +48 -9
- package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Workflow.js +655 -163
- package/dist/ts/ts/Conversion.js +6 -6
- package/dist/ts/ts/Core/ArcTypes.d.ts +73 -28
- package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/ts/Core/ArcTypes.js +219 -129
- package/dist/ts/ts/Core/Comment.d.ts.map +1 -1
- package/dist/ts/ts/Core/Comment.js +2 -2
- package/dist/ts/ts/Core/CommentList.js +7 -7
- package/dist/ts/ts/Core/Conversion.d.ts.map +1 -1
- package/dist/ts/ts/Core/Conversion.js +41 -41
- package/dist/ts/ts/Core/Data.d.ts.map +1 -1
- package/dist/ts/ts/Core/Data.js +14 -11
- package/dist/ts/ts/Core/DataContext.d.ts +1 -1
- package/dist/ts/ts/Core/DataContext.d.ts.map +1 -1
- package/dist/ts/ts/Core/DataContext.js +4 -4
- package/dist/ts/ts/Core/DataFile.d.ts +11 -8
- package/dist/ts/ts/Core/DataFile.d.ts.map +1 -1
- package/dist/ts/ts/Core/DataFile.js +55 -61
- package/dist/ts/ts/Core/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Core/Datamap.js +2 -3
- package/dist/ts/ts/Core/Helper/Collections.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Collections.js +2 -4
- package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Identifier.js +12 -15
- package/dist/ts/ts/Core/Helper/ORCID.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/ORCID.js +2 -3
- package/dist/ts/ts/Core/Helper/Regex.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Regex.js +52 -53
- package/dist/ts/ts/Core/Helper/SemVer.d.ts +13 -3
- package/dist/ts/ts/Core/Helper/SemVer.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/SemVer.js +96 -6
- package/dist/ts/ts/Core/Helper/Url.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Url.js +1 -1
- package/dist/ts/ts/Core/OntologyAnnotation.js +22 -22
- package/dist/ts/ts/Core/Person.d.ts.map +1 -1
- package/dist/ts/ts/Core/Person.js +2 -2
- package/dist/ts/ts/Core/Process/ColumnIndex.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ColumnIndex.js +10 -12
- package/dist/ts/ts/Core/Process/Component.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Component.js +22 -22
- package/dist/ts/ts/Core/Process/Factor.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Factor.js +7 -7
- package/dist/ts/ts/Core/Process/FactorValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/FactorValue.js +15 -15
- package/dist/ts/ts/Core/Process/Material.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Material.js +2 -2
- package/dist/ts/ts/Core/Process/MaterialAttribute.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/MaterialAttribute.js +6 -6
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +16 -16
- package/dist/ts/ts/Core/Process/Process.js +21 -21
- package/dist/ts/ts/Core/Process/ProcessInput.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProcessInput.js +2 -2
- package/dist/ts/ts/Core/Process/ProcessOutput.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProcessOutput.js +2 -2
- package/dist/ts/ts/Core/Process/ProcessParameterValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProcessParameterValue.js +17 -17
- package/dist/ts/ts/Core/Process/ProcessSequence.js +4 -4
- package/dist/ts/ts/Core/Process/Protocol.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Protocol.js +9 -9
- package/dist/ts/ts/Core/Process/ProtocolParameter.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProtocolParameter.js +6 -6
- package/dist/ts/ts/Core/Publication.d.ts.map +1 -1
- package/dist/ts/ts/Core/Publication.js +3 -3
- package/dist/ts/ts/Core/ScalarValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/ScalarValue.js +9 -13
- package/dist/ts/ts/Core/Table/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/ArcTable.js +18 -18
- package/dist/ts/ts/Core/Table/ArcTableAux.d.ts +1 -1
- package/dist/ts/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/ArcTableAux.js +50 -70
- package/dist/ts/ts/Core/Table/ArcTables.js +16 -16
- package/dist/ts/ts/Core/Table/CompositeHeader.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/CompositeHeader.js +5 -6
- package/dist/ts/ts/Core/Templates.d.ts.map +1 -1
- package/dist/ts/ts/Core/Templates.js +2 -2
- package/dist/ts/ts/FileSystem/Path.d.ts +13 -2
- package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/Path.js +37 -19
- package/dist/ts/ts/Json/Assay.js +22 -22
- package/dist/ts/ts/Json/Comment.js +9 -9
- package/dist/ts/ts/Json/Data.d.ts.map +1 -1
- package/dist/ts/ts/Json/Data.js +11 -11
- package/dist/ts/ts/Json/Datamap/DataContext.js +2 -2
- package/dist/ts/ts/Json/Decode.d.ts.map +1 -1
- package/dist/ts/ts/Json/Decode.js +3 -5
- package/dist/ts/ts/Json/Encode.js +2 -2
- package/dist/ts/ts/Json/Investigation.d.ts.map +1 -1
- package/dist/ts/ts/Json/Investigation.js +20 -20
- package/dist/ts/ts/Json/OntologyAnnotation.d.ts.map +1 -1
- package/dist/ts/ts/Json/OntologyAnnotation.js +18 -18
- package/dist/ts/ts/Json/OntologySourceReference.d.ts.map +1 -1
- package/dist/ts/ts/Json/OntologySourceReference.js +9 -9
- package/dist/ts/ts/Json/Person.d.ts.map +1 -1
- package/dist/ts/ts/Json/Person.js +20 -20
- package/dist/ts/ts/Json/Process/AssayMaterials.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/AssayMaterials.js +1 -2
- package/dist/ts/ts/Json/Process/Component.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Component.js +5 -6
- package/dist/ts/ts/Json/Process/Factor.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Factor.js +7 -7
- package/dist/ts/ts/Json/Process/FactorValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/FactorValue.js +2 -3
- package/dist/ts/ts/Json/Process/Material.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Material.js +9 -10
- package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttribute.js +5 -6
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +2 -3
- package/dist/ts/ts/Json/Process/Process.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Process.js +8 -9
- package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/ProcessParameterValue.js +1 -2
- package/dist/ts/ts/Json/Process/Protocol.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Protocol.js +17 -17
- package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/ProtocolParameter.js +6 -6
- package/dist/ts/ts/Json/Process/Sample.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Sample.js +9 -9
- package/dist/ts/ts/Json/Process/Source.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Source.js +10 -11
- package/dist/ts/ts/Json/Process/StudyMaterials.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/StudyMaterials.js +1 -2
- package/dist/ts/ts/Json/PropertyValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/PropertyValue.js +24 -24
- package/dist/ts/ts/Json/Publication.d.ts.map +1 -1
- package/dist/ts/ts/Json/Publication.js +10 -10
- package/dist/ts/ts/Json/ROCrate/LDContext.js +1 -2
- package/dist/ts/ts/Json/ROCrate/LDGraph.js +2 -2
- package/dist/ts/ts/Json/ROCrate/LDNode.js +5 -5
- package/dist/ts/ts/Json/Run.js +9 -9
- package/dist/ts/ts/Json/StringTable.d.ts.map +1 -1
- package/dist/ts/ts/Json/StringTable.js +4 -7
- package/dist/ts/ts/Json/Study.js +20 -20
- package/dist/ts/ts/Json/Table/CellTable.js +1 -2
- package/dist/ts/ts/Json/Table/OATable.js +1 -2
- package/dist/ts/ts/Json/Workflow.js +9 -9
- package/dist/ts/ts/Json.d.ts +121 -1
- package/dist/ts/ts/Json.d.ts.map +1 -1
- package/dist/ts/ts/Json.js +310 -2
- package/dist/ts/ts/JsonIO/Comment.d.ts +15 -0
- package/dist/ts/ts/JsonIO/Comment.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Comment.js +67 -0
- package/dist/ts/ts/JsonIO/Data.d.ts +9 -0
- package/dist/ts/ts/JsonIO/Data.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Data.js +49 -0
- package/dist/ts/ts/JsonIO/DataFile.d.ts +9 -0
- package/dist/ts/ts/JsonIO/DataFile.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/DataFile.js +48 -0
- package/dist/ts/ts/JsonIO/LDObject.d.ts +6 -0
- package/dist/ts/ts/JsonIO/LDObject.d.ts.map +1 -1
- package/dist/ts/ts/JsonIO/LDObject.js +173 -17
- package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts +15 -0
- package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/OntologySourceReference.js +67 -0
- package/dist/ts/ts/JsonIO/Publication.d.ts +15 -0
- package/dist/ts/ts/JsonIO/Publication.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Publication.js +68 -0
- package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts +9 -0
- package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/ArcTable.js +74 -0
- package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts +6 -0
- package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/CompositeCell.js +29 -0
- package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts +6 -0
- package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/CompositeHeader.js +29 -0
- package/dist/ts/ts/JsonIO/Table/IOType.d.ts +6 -0
- package/dist/ts/ts/JsonIO/Table/IOType.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/IOType.js +29 -0
- package/dist/ts/ts/License.d.ts.map +1 -1
- package/dist/ts/ts/License.js +6 -6
- package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDContext.js +31 -39
- package/dist/ts/ts/ROCrate/LDObject.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDObject.js +56 -49
- package/dist/ts/ts/ROCrate/LDTypes/Comment.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +5 -5
- package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.js +3 -0
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.js +22 -17
- package/dist/ts/ts/ROCrate/LDTypes/DefinedTerm.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/File.js +5 -5
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/LabProcess.js +9 -9
- package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.js +4 -4
- package/dist/ts/ts/ROCrate/LDTypes/Organization.js +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/Person.js +7 -7
- package/dist/ts/ts/ROCrate/LDTypes/PostalAddress.js +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.js +45 -48
- package/dist/ts/ts/ROCrate/LDTypes/Sample.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/ScholarlyArticle.js +4 -4
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +2 -2
- package/dist/ts/ts/ROCrateIO.d.ts +18 -4
- package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/ts/ROCrateIO.js +49 -38
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +9 -10
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +7 -7
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +6 -8
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +20 -20
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +7 -7
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +8 -8
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcRun.js +5 -6
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +3 -3
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +5 -6
- package/dist/ts/ts/Spreadsheet/CollectionAux.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/CollectionAux.js +10 -14
- package/dist/ts/ts/Spreadsheet/Datamap.js +1 -2
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapColumn.js +3 -3
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapHeader.js +10 -10
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.js +9 -10
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +5 -5
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +2 -2
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +4 -4
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +3 -3
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +5 -5
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +4 -4
- package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +7 -7
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +17 -17
- package/dist/ts/ts/Spreadsheet/Metadata/Study.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Study.js +8 -8
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +5 -5
- package/dist/ts/ts/WorkflowGraph/Adapters.d.ts +1 -1
- package/dist/ts/ts/WorkflowGraph/Adapters.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/Adapters.js +5 -6
- package/dist/ts/ts/WorkflowGraph/Builder.d.ts +25 -6
- package/dist/ts/ts/WorkflowGraph/Builder.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/Builder.js +264 -138
- package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts +6 -0
- package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/GraphTypes.js +4 -1
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts +8 -5
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.js +27 -10
- package/dist/ts/ts/Xlsx.js +3 -3
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts +3 -3
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.js +11 -23
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +3 -3
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +11 -23
- package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/DynamicObj.fs.js +16 -20
- package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/FableJS.fs.js +1 -1
- package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/ReflectionUtils.fs.js +8 -8
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +1 -2
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.6.0/Http.fs.js +4 -4
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCell.fs.js +8 -8
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCellsCollection.fs.js +18 -18
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsAddress.fs.js +3 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorkbook.fs.js +1 -1
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorksheet.fs.js +7 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Value.fs.js +3 -5
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Worksheet.fs.js +7 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Ranges/FsRangeBase.fs.js +1 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Tables/FsTable.fs.js +7 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Cell.fs.js +2 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Table.fs.js +1 -2
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Decode.fs.js +49 -71
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Encode.fs.js +1 -1
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs.js +1 -2
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Compare.fs.js +857 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/CoreSchema.fs.js +725 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Decode.fs.js +1175 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Encode.fs.js +123 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Layout.fs.js +282 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexeme.fs.js +203 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexer.fs.js +1502 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Model.fs.js +564 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Node.fs.js +453 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Parser.fs.js +2622 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Reader.fs.js +108 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Source.fs.js +649 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Tag.fs.js +32 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Validate.fs.js +1084 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Writer.fs.js +2927 -0
- package/package.json +5 -4
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Decode.fs.js +0 -1669
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Encode.fs.js +0 -57
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Escapes.fs.js +0 -320
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Interop/JsInterop.fs.js +0 -10
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Persil.fs.js +0 -414
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Preprocessing.fs.js +0 -319
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Reader.fs.js +0 -1884
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Regex.fs.js +0 -23
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/RegexActivePatterns.fs.js +0 -313
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Syntax.fs.js +0 -840
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Writer.fs.js +0 -689
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/YAMLiciousTypes.fs.js +0 -359
|
@@ -0,0 +1,2622 @@
|
|
|
1
|
+
import { FSharpException, Record, Union, FSharpRef } from '../../../node_modules/@fable-org/fable-library-ts/Types.js';
|
|
2
|
+
import { YamlError, Cursor__get_FirstOnLine, Cursor__get_LeadingTab, Cursor__get_SeparationHadTab, YamlErrorCode, Cursor__get_Text, Cursor__get_Origin, Cursor_$ctor_Z721C83C5 } from './Source.fs.js';
|
|
3
|
+
import { class_type, record_type, bool_type, union_type } from '../../../node_modules/@fable-org/fable-library-ts/Reflection.js';
|
|
4
|
+
import { Lexeme_$reflection, Lexeme, LexContext, GrammarContext, Lexeme_Scalar } from './Lexeme.fs.js';
|
|
5
|
+
import { SourceSpan_$reflection, SourceSpan, SourceMark, NodeProperties, YamlNode, Separation_NewLine, LineBreak, Separation, YamlNodeKind_Alias, YamlTag, YamlTag_Named, TagName, PropertyName, PropertyPlacement, MappingEntry, SequenceItem, YamlNodeKind_Mapping, Collection$1, CollectionStyle, YamlNodeKind_Sequence, YamlNodeKind_Scalar, YamlScalar, ScalarStyle, Trivia_BlankLine, Trivia_FullLineComment, StreamPart_Document$, YamlDocument, StreamPart_Trivia, PreludeItem_PreludeTrivia, DocumentMarker, StreamPart_ExtraEndMarker, PreludeItem_Directive, YamlDirective, YamlStream } from './Model.fs.js';
|
|
6
|
+
import { defaultOf, clear, equals, Exception, getEnumerator, disposeSafe } from '../../../node_modules/@fable-org/fable-library-ts/Util.js';
|
|
7
|
+
import { empty, ofSeq, singleton, ofArray } from '../../../node_modules/@fable-org/fable-library-ts/List.js';
|
|
8
|
+
import { toArray } from '../../../node_modules/@fable-org/fable-library-ts/Option.js';
|
|
9
|
+
import { YamlNodeModule_empty, YamlNodeModule_isMissingValue } from './Node.fs.js';
|
|
10
|
+
import { item, addRangeInPlace, insertRangeInPlace, setItem } from '../../../node_modules/@fable-org/fable-library-ts/Array.js';
|
|
11
|
+
import { next, decodeTagEscapes, nextIsBlockEntry } from './Lexer.fs.js';
|
|
12
|
+
import { FSharpResult$2_Ok, FSharpResult$2_Error$ } from '../../../node_modules/@fable-org/fable-library-ts/Result.js';
|
|
13
|
+
import { tryGetValue, addToSet } from '../../../node_modules/@fable-org/fable-library-ts/MapUtil.js';
|
|
14
|
+
import { YamlTagModule_coreNamespace } from './Tag.fs.js';
|
|
15
|
+
import { toText, printf, getCharAtIndex } from '../../../node_modules/@fable-org/fable-library-ts/String.js';
|
|
16
|
+
import { min } from '../../../node_modules/@fable-org/fable-library-ts/Double.js';
|
|
17
|
+
|
|
18
|
+
class ParseFailure extends FSharpException {
|
|
19
|
+
constructor(Data0) {
|
|
20
|
+
super();
|
|
21
|
+
this.Data0 = Data0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function ParseFailure_$reflection() {
|
|
25
|
+
return class_type("YAMLicious.ParseFailure", void 0, ParseFailure, class_type("System.Exception"));
|
|
26
|
+
}
|
|
27
|
+
class Tok extends Record {
|
|
28
|
+
constructor(Lexeme2, Span, Tab) {
|
|
29
|
+
super();
|
|
30
|
+
this.Lexeme = Lexeme2;
|
|
31
|
+
this.Span = Span;
|
|
32
|
+
this.Tab = Tab;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function Tok_$reflection() {
|
|
36
|
+
return record_type("YAMLicious.Tok", [], Tok, () => [["Lexeme", Lexeme_$reflection()], ["Span", SourceSpan_$reflection()], ["Tab", bool_type]]);
|
|
37
|
+
}
|
|
38
|
+
class Prop {
|
|
39
|
+
constructor(name, tag, anchor, span, tab) {
|
|
40
|
+
this.name = name;
|
|
41
|
+
this.tag = tag;
|
|
42
|
+
this.anchor = anchor;
|
|
43
|
+
this.span = span;
|
|
44
|
+
this.tab = tab;
|
|
45
|
+
this["NewLine@"] = false;
|
|
46
|
+
this["Comment@"] = void 0;
|
|
47
|
+
this["Trivia@"] = empty();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function Prop_$reflection() {
|
|
51
|
+
return class_type("YAMLicious.Prop", void 0, Prop);
|
|
52
|
+
}
|
|
53
|
+
function Prop_$ctor_Z21B18FED(name, tag, anchor, span, tab) {
|
|
54
|
+
return new Prop(name, tag, anchor, span, tab);
|
|
55
|
+
}
|
|
56
|
+
function Prop__get_Name(_) {
|
|
57
|
+
return _.name;
|
|
58
|
+
}
|
|
59
|
+
function Prop__get_Tag(_) {
|
|
60
|
+
return _.tag;
|
|
61
|
+
}
|
|
62
|
+
function Prop__get_Anchor(_) {
|
|
63
|
+
return _.anchor;
|
|
64
|
+
}
|
|
65
|
+
function Prop__get_Span(_) {
|
|
66
|
+
return _.span;
|
|
67
|
+
}
|
|
68
|
+
function Prop__get_Tab(_) {
|
|
69
|
+
return _.tab;
|
|
70
|
+
}
|
|
71
|
+
function Prop__get_NewLine(__) {
|
|
72
|
+
return __["NewLine@"];
|
|
73
|
+
}
|
|
74
|
+
function Prop__set_NewLine_Z1FBCCD16(__, v) {
|
|
75
|
+
__["NewLine@"] = v;
|
|
76
|
+
}
|
|
77
|
+
function Prop__get_Comment(__) {
|
|
78
|
+
return __["Comment@"];
|
|
79
|
+
}
|
|
80
|
+
function Prop__set_Comment_22445A31(__, v) {
|
|
81
|
+
__["Comment@"] = v;
|
|
82
|
+
}
|
|
83
|
+
function Prop__get_Trivia(__) {
|
|
84
|
+
return __["Trivia@"];
|
|
85
|
+
}
|
|
86
|
+
function Prop__set_Trivia_ZA6FC775(__, v) {
|
|
87
|
+
__["Trivia@"] = v;
|
|
88
|
+
}
|
|
89
|
+
function Phase_AwaitingEntry() {
|
|
90
|
+
return Phase.AwaitingEntry;
|
|
91
|
+
}
|
|
92
|
+
function Phase_AfterDash() {
|
|
93
|
+
return Phase.AfterDash;
|
|
94
|
+
}
|
|
95
|
+
function Phase_AfterQuestion() {
|
|
96
|
+
return Phase.AfterQuestion;
|
|
97
|
+
}
|
|
98
|
+
function Phase_AwaitingColon() {
|
|
99
|
+
return Phase.AwaitingColon;
|
|
100
|
+
}
|
|
101
|
+
function Phase_AfterColon() {
|
|
102
|
+
return Phase.AfterColon;
|
|
103
|
+
}
|
|
104
|
+
function Phase_FlowItem() {
|
|
105
|
+
return Phase.FlowItem;
|
|
106
|
+
}
|
|
107
|
+
function Phase_FlowAfterItem() {
|
|
108
|
+
return Phase.FlowAfterItem;
|
|
109
|
+
}
|
|
110
|
+
function Phase_FlowEntry() {
|
|
111
|
+
return Phase.FlowEntry;
|
|
112
|
+
}
|
|
113
|
+
function Phase_FlowQuestion() {
|
|
114
|
+
return Phase.FlowQuestion;
|
|
115
|
+
}
|
|
116
|
+
function Phase_FlowAfterKey() {
|
|
117
|
+
return Phase.FlowAfterKey;
|
|
118
|
+
}
|
|
119
|
+
function Phase_FlowColon() {
|
|
120
|
+
return Phase.FlowColon;
|
|
121
|
+
}
|
|
122
|
+
function Phase_FlowAfterValue() {
|
|
123
|
+
return Phase.FlowAfterValue;
|
|
124
|
+
}
|
|
125
|
+
class Phase extends Union {
|
|
126
|
+
constructor(tag, fields) {
|
|
127
|
+
super();
|
|
128
|
+
this.tag = tag;
|
|
129
|
+
this.fields = fields;
|
|
130
|
+
}
|
|
131
|
+
cases() {
|
|
132
|
+
return ["AwaitingEntry", "AfterDash", "AfterQuestion", "AwaitingColon", "AfterColon", "FlowItem", "FlowAfterItem", "FlowEntry", "FlowQuestion", "FlowAfterKey", "FlowColon", "FlowAfterValue"];
|
|
133
|
+
}
|
|
134
|
+
static {
|
|
135
|
+
this.AwaitingEntry = new Phase(0, []);
|
|
136
|
+
}
|
|
137
|
+
static {
|
|
138
|
+
this.AfterDash = new Phase(1, []);
|
|
139
|
+
}
|
|
140
|
+
static {
|
|
141
|
+
this.AfterQuestion = new Phase(2, []);
|
|
142
|
+
}
|
|
143
|
+
static {
|
|
144
|
+
this.AwaitingColon = new Phase(3, []);
|
|
145
|
+
}
|
|
146
|
+
static {
|
|
147
|
+
this.AfterColon = new Phase(4, []);
|
|
148
|
+
}
|
|
149
|
+
static {
|
|
150
|
+
this.FlowItem = new Phase(5, []);
|
|
151
|
+
}
|
|
152
|
+
static {
|
|
153
|
+
this.FlowAfterItem = new Phase(6, []);
|
|
154
|
+
}
|
|
155
|
+
static {
|
|
156
|
+
this.FlowEntry = new Phase(7, []);
|
|
157
|
+
}
|
|
158
|
+
static {
|
|
159
|
+
this.FlowQuestion = new Phase(8, []);
|
|
160
|
+
}
|
|
161
|
+
static {
|
|
162
|
+
this.FlowAfterKey = new Phase(9, []);
|
|
163
|
+
}
|
|
164
|
+
static {
|
|
165
|
+
this.FlowColon = new Phase(10, []);
|
|
166
|
+
}
|
|
167
|
+
static {
|
|
168
|
+
this.FlowAfterValue = new Phase(11, []);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function Phase_$reflection() {
|
|
172
|
+
return union_type("YAMLicious.Phase", [], Phase, () => [[], [], [], [], [], [], [], [], [], [], [], []]);
|
|
173
|
+
}
|
|
174
|
+
function FrameKind_Block() {
|
|
175
|
+
return FrameKind.Block;
|
|
176
|
+
}
|
|
177
|
+
function FrameKind_FlowSequence() {
|
|
178
|
+
return FrameKind.FlowSequence;
|
|
179
|
+
}
|
|
180
|
+
function FrameKind_FlowMapping() {
|
|
181
|
+
return FrameKind.FlowMapping;
|
|
182
|
+
}
|
|
183
|
+
function FrameKind_FlowPair() {
|
|
184
|
+
return FrameKind.FlowPair;
|
|
185
|
+
}
|
|
186
|
+
class FrameKind extends Union {
|
|
187
|
+
constructor(tag, fields) {
|
|
188
|
+
super();
|
|
189
|
+
this.tag = tag;
|
|
190
|
+
this.fields = fields;
|
|
191
|
+
}
|
|
192
|
+
cases() {
|
|
193
|
+
return ["Block", "FlowSequence", "FlowMapping", "FlowPair"];
|
|
194
|
+
}
|
|
195
|
+
static {
|
|
196
|
+
this.Block = new FrameKind(0, []);
|
|
197
|
+
}
|
|
198
|
+
static {
|
|
199
|
+
this.FlowSequence = new FrameKind(1, []);
|
|
200
|
+
}
|
|
201
|
+
static {
|
|
202
|
+
this.FlowMapping = new FrameKind(2, []);
|
|
203
|
+
}
|
|
204
|
+
static {
|
|
205
|
+
this.FlowPair = new FrameKind(3, []);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function FrameKind_$reflection() {
|
|
209
|
+
return union_type("YAMLicious.FrameKind", [], FrameKind, () => [[], [], [], []]);
|
|
210
|
+
}
|
|
211
|
+
function RequestKind_Root() {
|
|
212
|
+
return RequestKind.Root;
|
|
213
|
+
}
|
|
214
|
+
function RequestKind_Item() {
|
|
215
|
+
return RequestKind.Item;
|
|
216
|
+
}
|
|
217
|
+
function RequestKind_Value() {
|
|
218
|
+
return RequestKind.Value;
|
|
219
|
+
}
|
|
220
|
+
function RequestKind_ExplicitKey() {
|
|
221
|
+
return RequestKind.ExplicitKey;
|
|
222
|
+
}
|
|
223
|
+
function RequestKind_ExplicitValue() {
|
|
224
|
+
return RequestKind.ExplicitValue;
|
|
225
|
+
}
|
|
226
|
+
function RequestKind_Continue() {
|
|
227
|
+
return RequestKind.Continue;
|
|
228
|
+
}
|
|
229
|
+
class RequestKind extends Union {
|
|
230
|
+
constructor(tag, fields) {
|
|
231
|
+
super();
|
|
232
|
+
this.tag = tag;
|
|
233
|
+
this.fields = fields;
|
|
234
|
+
}
|
|
235
|
+
cases() {
|
|
236
|
+
return ["Root", "Item", "Value", "ExplicitKey", "ExplicitValue", "Continue"];
|
|
237
|
+
}
|
|
238
|
+
static {
|
|
239
|
+
this.Root = new RequestKind(0, []);
|
|
240
|
+
}
|
|
241
|
+
static {
|
|
242
|
+
this.Item = new RequestKind(1, []);
|
|
243
|
+
}
|
|
244
|
+
static {
|
|
245
|
+
this.Value = new RequestKind(2, []);
|
|
246
|
+
}
|
|
247
|
+
static {
|
|
248
|
+
this.ExplicitKey = new RequestKind(3, []);
|
|
249
|
+
}
|
|
250
|
+
static {
|
|
251
|
+
this.ExplicitValue = new RequestKind(4, []);
|
|
252
|
+
}
|
|
253
|
+
static {
|
|
254
|
+
this.Continue = new RequestKind(5, []);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function RequestKind_$reflection() {
|
|
258
|
+
return union_type("YAMLicious.RequestKind", [], RequestKind, () => [[], [], [], [], [], []]);
|
|
259
|
+
}
|
|
260
|
+
class Frame {
|
|
261
|
+
constructor(isMap, col, start) {
|
|
262
|
+
this.isMap = isMap;
|
|
263
|
+
this.col = col | 0;
|
|
264
|
+
this.start = start;
|
|
265
|
+
this["Kind@"] = FrameKind.Block;
|
|
266
|
+
this["Opener@"] = new SourceSpan(this.start, this.start);
|
|
267
|
+
this["Outermost@"] = false;
|
|
268
|
+
this["OpenerTab@"] = false;
|
|
269
|
+
this["OpeningComment@"] = void 0;
|
|
270
|
+
this["Following@"] = empty();
|
|
271
|
+
this["Pend@"] = YamlNodeModule_empty;
|
|
272
|
+
this["PendEnd@"] = this.start;
|
|
273
|
+
this["LastEnd@"] = this.start;
|
|
274
|
+
this["Phase@"] = Phase.AwaitingEntry;
|
|
275
|
+
this["Indentless@"] = false;
|
|
276
|
+
this["Tag@"] = void 0;
|
|
277
|
+
this["Anchor@"] = void 0;
|
|
278
|
+
this["Layout@"] = empty();
|
|
279
|
+
this["Items@"] = [];
|
|
280
|
+
this["Entries@"] = [];
|
|
281
|
+
this["End@"] = [];
|
|
282
|
+
this["EntryStart@"] = this.start;
|
|
283
|
+
this["Before@"] = empty();
|
|
284
|
+
this["Dash@"] = void 0;
|
|
285
|
+
this["Question@"] = void 0;
|
|
286
|
+
this["KeyNode@"] = YamlNodeModule_empty;
|
|
287
|
+
this["BeforeColon@"] = empty();
|
|
288
|
+
this["Colon@"] = void 0;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function Frame_$reflection() {
|
|
292
|
+
return class_type("YAMLicious.Frame", void 0, Frame);
|
|
293
|
+
}
|
|
294
|
+
function Frame_$ctor_Z2E8F49A(isMap, col, start) {
|
|
295
|
+
return new Frame(isMap, col, start);
|
|
296
|
+
}
|
|
297
|
+
function Frame__get_IsMap(_) {
|
|
298
|
+
return _.isMap;
|
|
299
|
+
}
|
|
300
|
+
function Frame__get_Col(_) {
|
|
301
|
+
return _.col | 0;
|
|
302
|
+
}
|
|
303
|
+
function Frame__get_Kind(__) {
|
|
304
|
+
return __["Kind@"];
|
|
305
|
+
}
|
|
306
|
+
function Frame__set_Kind_639F076D(__, v) {
|
|
307
|
+
__["Kind@"] = v;
|
|
308
|
+
}
|
|
309
|
+
function Frame__get_Opener(__) {
|
|
310
|
+
return __["Opener@"];
|
|
311
|
+
}
|
|
312
|
+
function Frame__set_Opener_1A9599A9(__, v) {
|
|
313
|
+
__["Opener@"] = v;
|
|
314
|
+
}
|
|
315
|
+
function Frame__get_Outermost(__) {
|
|
316
|
+
return __["Outermost@"];
|
|
317
|
+
}
|
|
318
|
+
function Frame__set_Outermost_Z1FBCCD16(__, v) {
|
|
319
|
+
__["Outermost@"] = v;
|
|
320
|
+
}
|
|
321
|
+
function Frame__get_OpenerTab(__) {
|
|
322
|
+
return __["OpenerTab@"];
|
|
323
|
+
}
|
|
324
|
+
function Frame__set_OpenerTab_Z1FBCCD16(__, v) {
|
|
325
|
+
__["OpenerTab@"] = v;
|
|
326
|
+
}
|
|
327
|
+
function Frame__get_OpeningComment(__) {
|
|
328
|
+
return __["OpeningComment@"];
|
|
329
|
+
}
|
|
330
|
+
function Frame__set_OpeningComment_22445A31(__, v) {
|
|
331
|
+
__["OpeningComment@"] = v;
|
|
332
|
+
}
|
|
333
|
+
function Frame__get_Following(__) {
|
|
334
|
+
return __["Following@"];
|
|
335
|
+
}
|
|
336
|
+
function Frame__set_Following_ZA6FC775(__, v) {
|
|
337
|
+
__["Following@"] = v;
|
|
338
|
+
}
|
|
339
|
+
function Frame__get_Pend(__) {
|
|
340
|
+
return __["Pend@"];
|
|
341
|
+
}
|
|
342
|
+
function Frame__set_Pend_51084C1(__, v) {
|
|
343
|
+
__["Pend@"] = v;
|
|
344
|
+
}
|
|
345
|
+
function Frame__get_PendEnd(__) {
|
|
346
|
+
return __["PendEnd@"];
|
|
347
|
+
}
|
|
348
|
+
function Frame__set_PendEnd_1A8C0E50(__, v) {
|
|
349
|
+
__["PendEnd@"] = v;
|
|
350
|
+
}
|
|
351
|
+
function Frame__get_Start(_) {
|
|
352
|
+
return _.start;
|
|
353
|
+
}
|
|
354
|
+
function Frame__get_LastEnd(__) {
|
|
355
|
+
return __["LastEnd@"];
|
|
356
|
+
}
|
|
357
|
+
function Frame__set_LastEnd_1A8C0E50(__, v) {
|
|
358
|
+
__["LastEnd@"] = v;
|
|
359
|
+
}
|
|
360
|
+
function Frame__get_Phase(__) {
|
|
361
|
+
return __["Phase@"];
|
|
362
|
+
}
|
|
363
|
+
function Frame__set_Phase_1FF842B7(__, v) {
|
|
364
|
+
__["Phase@"] = v;
|
|
365
|
+
}
|
|
366
|
+
function Frame__get_AwaitsColon(this$) {
|
|
367
|
+
if (Frame__get_Phase(this$).tag === /* AwaitingColon */
|
|
368
|
+
3) {
|
|
369
|
+
return true;
|
|
370
|
+
} else {
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
function Frame__get_Indentless(__) {
|
|
375
|
+
return __["Indentless@"];
|
|
376
|
+
}
|
|
377
|
+
function Frame__set_Indentless_Z1FBCCD16(__, v) {
|
|
378
|
+
__["Indentless@"] = v;
|
|
379
|
+
}
|
|
380
|
+
function Frame__get_Tag(__) {
|
|
381
|
+
return __["Tag@"];
|
|
382
|
+
}
|
|
383
|
+
function Frame__set_Tag_FE0ADB0(__, v) {
|
|
384
|
+
__["Tag@"] = v;
|
|
385
|
+
}
|
|
386
|
+
function Frame__get_Anchor(__) {
|
|
387
|
+
return __["Anchor@"];
|
|
388
|
+
}
|
|
389
|
+
function Frame__set_Anchor_6DFDD678(__, v) {
|
|
390
|
+
__["Anchor@"] = v;
|
|
391
|
+
}
|
|
392
|
+
function Frame__get_Layout(__) {
|
|
393
|
+
return __["Layout@"];
|
|
394
|
+
}
|
|
395
|
+
function Frame__set_Layout_Z300AE9EC(__, v) {
|
|
396
|
+
__["Layout@"] = v;
|
|
397
|
+
}
|
|
398
|
+
function Frame__get_Items(__) {
|
|
399
|
+
return __["Items@"];
|
|
400
|
+
}
|
|
401
|
+
function Frame__get_Entries(__) {
|
|
402
|
+
return __["Entries@"];
|
|
403
|
+
}
|
|
404
|
+
function Frame__get_End(__) {
|
|
405
|
+
return __["End@"];
|
|
406
|
+
}
|
|
407
|
+
function Frame__get_EntryStart(__) {
|
|
408
|
+
return __["EntryStart@"];
|
|
409
|
+
}
|
|
410
|
+
function Frame__set_EntryStart_1A8C0E50(__, v) {
|
|
411
|
+
__["EntryStart@"] = v;
|
|
412
|
+
}
|
|
413
|
+
function Frame__get_Before(__) {
|
|
414
|
+
return __["Before@"];
|
|
415
|
+
}
|
|
416
|
+
function Frame__set_Before_ZA6FC775(__, v) {
|
|
417
|
+
__["Before@"] = v;
|
|
418
|
+
}
|
|
419
|
+
function Frame__get_Dash(__) {
|
|
420
|
+
return __["Dash@"];
|
|
421
|
+
}
|
|
422
|
+
function Frame__set_Dash_Z20DDFD6D(__, v) {
|
|
423
|
+
__["Dash@"] = v;
|
|
424
|
+
}
|
|
425
|
+
function Frame__get_Question(__) {
|
|
426
|
+
return __["Question@"];
|
|
427
|
+
}
|
|
428
|
+
function Frame__set_Question_Z20DDFD6D(__, v) {
|
|
429
|
+
__["Question@"] = v;
|
|
430
|
+
}
|
|
431
|
+
function Frame__get_KeyNode(__) {
|
|
432
|
+
return __["KeyNode@"];
|
|
433
|
+
}
|
|
434
|
+
function Frame__set_KeyNode_51084C1(__, v) {
|
|
435
|
+
__["KeyNode@"] = v;
|
|
436
|
+
}
|
|
437
|
+
function Frame__get_BeforeColon(__) {
|
|
438
|
+
return __["BeforeColon@"];
|
|
439
|
+
}
|
|
440
|
+
function Frame__set_BeforeColon_ZA6FC775(__, v) {
|
|
441
|
+
__["BeforeColon@"] = v;
|
|
442
|
+
}
|
|
443
|
+
function Frame__get_Colon(__) {
|
|
444
|
+
return __["Colon@"];
|
|
445
|
+
}
|
|
446
|
+
function Frame__set_Colon_Z20DDFD6D(__, v) {
|
|
447
|
+
__["Colon@"] = v;
|
|
448
|
+
}
|
|
449
|
+
function Frame__get_FirstSpan(this$) {
|
|
450
|
+
const first = this$.isMap ? Frame__get_Entries(this$).length > 0 ? item(0, Frame__get_Entries(this$)).Span : void 0 : Frame__get_Items(this$).length > 0 ? item(0, Frame__get_Items(this$)).Span : void 0;
|
|
451
|
+
if (first == null) {
|
|
452
|
+
return new SourceSpan(Frame__get_EntryStart(this$), Frame__get_LastEnd(this$));
|
|
453
|
+
} else {
|
|
454
|
+
return first;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
function Frame__get_FirstKeySpan(this$) {
|
|
458
|
+
if (Frame__get_Entries(this$).length > 0) {
|
|
459
|
+
return item(0, Frame__get_Entries(this$)).Key.Span;
|
|
460
|
+
} else {
|
|
461
|
+
return Frame__get_KeyNode(this$).Span;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
const ParserSupport_zeroMark = new SourceMark(1, 1);
|
|
465
|
+
function ParserSupport_spanBetween(first, finish) {
|
|
466
|
+
return new SourceSpan(first, finish);
|
|
467
|
+
}
|
|
468
|
+
function ParserSupport_spanAt(mark) {
|
|
469
|
+
return new SourceSpan(mark, mark);
|
|
470
|
+
}
|
|
471
|
+
const ParserSupport_noProperties = new NodeProperties(void 0, void 0);
|
|
472
|
+
function ParserSupport_missingNode(at) {
|
|
473
|
+
return new YamlNode(YamlNodeModule_empty.Kind, YamlNodeModule_empty.Properties, YamlNodeModule_empty.PropertyLayout, YamlNodeModule_empty.TrailingComment, ParserSupport_spanAt(at));
|
|
474
|
+
}
|
|
475
|
+
function ParserSupport_endOf(node) {
|
|
476
|
+
const matchValue = node.Span;
|
|
477
|
+
if (matchValue == null) {
|
|
478
|
+
return ParserSupport_zeroMark;
|
|
479
|
+
} else {
|
|
480
|
+
return matchValue.Finish;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
function ParserSupport_failWith(code, message, span, related) {
|
|
484
|
+
throw new ParseFailure(new YamlError(code, message, span, related));
|
|
485
|
+
}
|
|
486
|
+
function ParserSupport_isBlockScalar(scalar) {
|
|
487
|
+
if (scalar.Style.tag === /* Block */
|
|
488
|
+
3) {
|
|
489
|
+
return true;
|
|
490
|
+
} else {
|
|
491
|
+
return false;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
function ParserSupport_separation(newLine, comment, following) {
|
|
495
|
+
if (newLine ? true : comment != null) {
|
|
496
|
+
return Separation_NewLine(new LineBreak(comment, following));
|
|
497
|
+
} else {
|
|
498
|
+
return Separation.Inline;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
class YamlParser {
|
|
502
|
+
constructor(cursor) {
|
|
503
|
+
this.cursor = cursor;
|
|
504
|
+
this.stack = [];
|
|
505
|
+
this.pending = [];
|
|
506
|
+
this.parts = [];
|
|
507
|
+
this.hasBuffer = false;
|
|
508
|
+
this.buffer = new Tok(Lexeme.StreamStart, ParserSupport_spanAt(ParserSupport_zeroMark), false);
|
|
509
|
+
this.docPrelude = [];
|
|
510
|
+
this.docBefore = [];
|
|
511
|
+
this.docAfter = [];
|
|
512
|
+
this.tagHandles = /* @__PURE__ */ new Map([]);
|
|
513
|
+
this.anchors = /* @__PURE__ */ new Set([]);
|
|
514
|
+
this.docOpen = false;
|
|
515
|
+
this.docMarker = void 0;
|
|
516
|
+
this.docStart = ParserSupport_zeroMark;
|
|
517
|
+
this.docRoot = YamlNodeModule_empty;
|
|
518
|
+
this.yamlDirective = void 0;
|
|
519
|
+
this.hasDirective = false;
|
|
520
|
+
this.directiveStart = ParserSupport_zeroMark;
|
|
521
|
+
this.finished = false;
|
|
522
|
+
this.bomSeen = false;
|
|
523
|
+
this.bomSpan = ParserSupport_spanAt(ParserSupport_zeroMark);
|
|
524
|
+
this.flowCount = 0;
|
|
525
|
+
this.flowOwner = -1;
|
|
526
|
+
this.lineStarts = defaultOf();
|
|
527
|
+
this.flowKind = YamlNodeKind_Alias("");
|
|
528
|
+
this.gapComment = void 0;
|
|
529
|
+
this.gapNewLine = false;
|
|
530
|
+
this.gapReady = false;
|
|
531
|
+
this.flowProps = [];
|
|
532
|
+
this.flowLead = empty();
|
|
533
|
+
this.flowNewLine = false;
|
|
534
|
+
this.flowComment = void 0;
|
|
535
|
+
this.flowIndicatorNewLine = false;
|
|
536
|
+
this.flowIndicatorComment = void 0;
|
|
537
|
+
this.props = [];
|
|
538
|
+
this.lead = [];
|
|
539
|
+
this.requested = false;
|
|
540
|
+
this.kind = RequestKind.Root;
|
|
541
|
+
this.owner = -1;
|
|
542
|
+
this.compact = false;
|
|
543
|
+
this.indentless = false;
|
|
544
|
+
this.sawNewLine = false;
|
|
545
|
+
this.indicatorEnd = ParserSupport_zeroMark;
|
|
546
|
+
this.elementNewLine = false;
|
|
547
|
+
this.elementComment = void 0;
|
|
548
|
+
this.indicatorNewLine = false;
|
|
549
|
+
this.indicatorComment = void 0;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
function YamlParser_$reflection() {
|
|
553
|
+
return class_type("YAMLicious.YamlParser", void 0, YamlParser);
|
|
554
|
+
}
|
|
555
|
+
function YamlParser_$ctor_4FA7F272(cursor) {
|
|
556
|
+
return new YamlParser(cursor);
|
|
557
|
+
}
|
|
558
|
+
function YamlParser__Lex_49318336(_, ctx) {
|
|
559
|
+
const first = Cursor__get_FirstOnLine(_.cursor);
|
|
560
|
+
const matchValue = next(ctx, _.cursor);
|
|
561
|
+
if (matchValue.tag === /* Ok */
|
|
562
|
+
0) {
|
|
563
|
+
const located = matchValue.fields[0];
|
|
564
|
+
return new Tok(located.Value, located.Span, first ? Cursor__get_LeadingTab(_.cursor) : Cursor__get_SeparationHadTab(_.cursor));
|
|
565
|
+
} else {
|
|
566
|
+
throw new ParseFailure(matchValue.fields[0]);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
function YamlParser__Next_49318336(this$, ctx) {
|
|
570
|
+
if (this$.hasBuffer) {
|
|
571
|
+
this$.hasBuffer = false;
|
|
572
|
+
return this$.buffer;
|
|
573
|
+
} else {
|
|
574
|
+
return YamlParser__Lex_49318336(this$, ctx);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
function YamlParser__Unread_Z1030D618(_, tok) {
|
|
578
|
+
_.buffer = tok;
|
|
579
|
+
_.hasBuffer = true;
|
|
580
|
+
}
|
|
581
|
+
function YamlParser__RootContext(_) {
|
|
582
|
+
return new LexContext(GrammarContext.BlockIn, -1, false);
|
|
583
|
+
}
|
|
584
|
+
function YamlParser__NodeContext(_) {
|
|
585
|
+
if (YamlParser__isContinue(_)) {
|
|
586
|
+
const top = item(_.stack.length - 1, _.stack);
|
|
587
|
+
return new LexContext(GrammarContext.BlockIn, Frame__get_Col(top), Frame__get_IsMap(top));
|
|
588
|
+
} else {
|
|
589
|
+
return new LexContext(GrammarContext.BlockIn, _.owner, false);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
function YamlParser__LineContext(_) {
|
|
593
|
+
return new LexContext(GrammarContext.BlockIn, _.stack.length > 0 ? Frame__get_Col(item(_.stack.length - 1, _.stack)) : -1, false);
|
|
594
|
+
}
|
|
595
|
+
function YamlParser__EolComment(this$) {
|
|
596
|
+
const next = YamlParser__Next_49318336(this$, YamlParser__RootContext(this$));
|
|
597
|
+
const matchValue = next.Lexeme;
|
|
598
|
+
let matchResult = void 0, comment = void 0;
|
|
599
|
+
if (matchValue.tag === /* Comment */
|
|
600
|
+
19) {
|
|
601
|
+
if (matchValue.fields[1]) {
|
|
602
|
+
matchResult = 1;
|
|
603
|
+
} else {
|
|
604
|
+
matchResult = 0;
|
|
605
|
+
comment = matchValue.fields[0];
|
|
606
|
+
}
|
|
607
|
+
} else {
|
|
608
|
+
matchResult = 1;
|
|
609
|
+
}
|
|
610
|
+
switch (matchResult) {
|
|
611
|
+
case 0:
|
|
612
|
+
return comment;
|
|
613
|
+
default: {
|
|
614
|
+
YamlParser__Unread_Z1030D618(this$, next);
|
|
615
|
+
return void 0;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function YamlParser__TakePending(_) {
|
|
620
|
+
if (_.pending.length === 0) {
|
|
621
|
+
return empty();
|
|
622
|
+
} else {
|
|
623
|
+
const taken = ofSeq(_.pending);
|
|
624
|
+
clear(_.pending);
|
|
625
|
+
return taken;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
function YamlParser__ResolveTag_42BB4259(_, tok, token) {
|
|
629
|
+
if (token.tag === /* Shorthand */
|
|
630
|
+
1) {
|
|
631
|
+
const suffix = token.fields[1];
|
|
632
|
+
const handle = token.fields[0];
|
|
633
|
+
if (handle === "!" && suffix.length === 0) {
|
|
634
|
+
return YamlTag.NonSpecific;
|
|
635
|
+
} else {
|
|
636
|
+
let decoded;
|
|
637
|
+
const matchValue = decodeTagEscapes(suffix);
|
|
638
|
+
decoded = matchValue == null ? ParserSupport_failWith(YamlErrorCode.InvalidTag, "The %-escapes of a tag have to spell UTF-8 text.", tok.Span, empty()) : matchValue;
|
|
639
|
+
let matchValue_1;
|
|
640
|
+
const cell = new FSharpRef(defaultOf());
|
|
641
|
+
matchValue_1 = [tryGetValue(_.tagHandles, handle, cell), cell.contents];
|
|
642
|
+
if (matchValue_1[0]) {
|
|
643
|
+
return YamlTag_Named(new TagName(matchValue_1[1][0], decoded));
|
|
644
|
+
} else {
|
|
645
|
+
switch (handle) {
|
|
646
|
+
case "!!":
|
|
647
|
+
return YamlTag_Named(new TagName(YamlTagModule_coreNamespace, decoded));
|
|
648
|
+
case "!":
|
|
649
|
+
return YamlTag_Named(new TagName("!", decoded));
|
|
650
|
+
default:
|
|
651
|
+
return ParserSupport_failWith(YamlErrorCode.UndeclaredTagHandle, toText(printf("The tag handle %s is not declared by a %%TAG directive."))(handle), tok.Span, empty());
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
} else {
|
|
656
|
+
const uri = token.fields[0];
|
|
657
|
+
if (uri === "!") {
|
|
658
|
+
return ParserSupport_failWith(YamlErrorCode.InvalidTag, "The verbatim tag !<!> is invalid, because a local tag needs a name behind the `!`.", tok.Span, empty());
|
|
659
|
+
} else {
|
|
660
|
+
return YamlTag_Named(new TagName("", uri));
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
function YamlParser__MakeProp_Z1030D618(this$, tok) {
|
|
665
|
+
const matchValue = tok.Lexeme;
|
|
666
|
+
switch (matchValue.tag) {
|
|
667
|
+
case /* Tag */
|
|
668
|
+
17:
|
|
669
|
+
return Prop_$ctor_Z21B18FED(PropertyName.Tag, YamlParser__ResolveTag_42BB4259(this$, tok, matchValue.fields[0]), void 0, tok.Span, tok.Tab);
|
|
670
|
+
case /* Anchor */
|
|
671
|
+
15: {
|
|
672
|
+
const name = matchValue.fields[0];
|
|
673
|
+
addToSet(name, this$.anchors);
|
|
674
|
+
return Prop_$ctor_Z21B18FED(PropertyName.Anchor, void 0, name, tok.Span, tok.Tab);
|
|
675
|
+
}
|
|
676
|
+
default:
|
|
677
|
+
return ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A property was expected.", tok.Span, empty());
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
function YamlParser__AddProp_Z1030D618(this$, tok) {
|
|
681
|
+
if (this$.props.length === 0) {
|
|
682
|
+
this$.indicatorNewLine = this$.elementNewLine;
|
|
683
|
+
this$.indicatorComment = this$.elementComment;
|
|
684
|
+
addRangeInPlace(this$.pending, this$.lead);
|
|
685
|
+
clear(this$.pending);
|
|
686
|
+
} else {
|
|
687
|
+
const previous = item(this$.props.length - 1, this$.props);
|
|
688
|
+
Prop__set_NewLine_Z1FBCCD16(previous, this$.elementNewLine);
|
|
689
|
+
Prop__set_Comment_22445A31(previous, this$.elementComment);
|
|
690
|
+
Prop__set_Trivia_ZA6FC775(previous, YamlParser__TakePending(this$));
|
|
691
|
+
}
|
|
692
|
+
this$.elementNewLine = false;
|
|
693
|
+
this$.elementComment = void 0;
|
|
694
|
+
void this$.props.push(YamlParser__MakeProp_Z1030D618(this$, tok));
|
|
695
|
+
}
|
|
696
|
+
function YamlParser__CloseElement(_) {
|
|
697
|
+
if (_.props.length === 0) {
|
|
698
|
+
_.indicatorNewLine = _.elementNewLine;
|
|
699
|
+
_.indicatorComment = _.elementComment;
|
|
700
|
+
} else {
|
|
701
|
+
const last = item(_.props.length - 1, _.props);
|
|
702
|
+
Prop__set_NewLine_Z1FBCCD16(last, _.elementNewLine);
|
|
703
|
+
Prop__set_Comment_22445A31(last, _.elementComment);
|
|
704
|
+
}
|
|
705
|
+
_.elementNewLine = false;
|
|
706
|
+
_.elementComment = void 0;
|
|
707
|
+
}
|
|
708
|
+
function YamlParser__OwnLineCount(_) {
|
|
709
|
+
let count = 0;
|
|
710
|
+
for (let i = 0; i <= _.props.length - 1; i++) {
|
|
711
|
+
if (Prop__get_NewLine(item(i, _.props))) {
|
|
712
|
+
count = i + 1 | 0;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
return count | 0;
|
|
716
|
+
}
|
|
717
|
+
function YamlParser__BuildPropsOf_Z648DC8C4(_, list, first, until) {
|
|
718
|
+
let tag = void 0;
|
|
719
|
+
let anchor = void 0;
|
|
720
|
+
let tagSpan = ParserSupport_spanAt(ParserSupport_zeroMark);
|
|
721
|
+
let anchorSpan = ParserSupport_spanAt(ParserSupport_zeroMark);
|
|
722
|
+
for (let i = first; i <= until - 1; i++) {
|
|
723
|
+
const prop = item(i, list);
|
|
724
|
+
if (equals(Prop__get_Name(prop), PropertyName.Tag)) {
|
|
725
|
+
if (tag != null) {
|
|
726
|
+
ParserSupport_failWith(YamlErrorCode.DuplicateTag, "A node has at most one tag.", Prop__get_Span(prop), singleton(tagSpan));
|
|
727
|
+
}
|
|
728
|
+
tag = Prop__get_Tag(prop);
|
|
729
|
+
tagSpan = Prop__get_Span(prop);
|
|
730
|
+
} else {
|
|
731
|
+
if (anchor != null) {
|
|
732
|
+
ParserSupport_failWith(YamlErrorCode.DuplicateAnchor, "A node has at most one anchor.", Prop__get_Span(prop), singleton(anchorSpan));
|
|
733
|
+
}
|
|
734
|
+
anchor = Prop__get_Anchor(prop);
|
|
735
|
+
anchorSpan = Prop__get_Span(prop);
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
return new NodeProperties(tag, anchor);
|
|
739
|
+
}
|
|
740
|
+
function YamlParser__BuildProps_Z37302880(this$, first, until) {
|
|
741
|
+
return YamlParser__BuildPropsOf_Z648DC8C4(this$, this$.props, first, until);
|
|
742
|
+
}
|
|
743
|
+
function YamlParser__BuildLayoutOf_610EDFFD(_, list, first, until, lastFollowing, contentFollows) {
|
|
744
|
+
const layout = [];
|
|
745
|
+
for (let i = first; i <= until - 1; i++) {
|
|
746
|
+
const prop = item(i, list);
|
|
747
|
+
let after;
|
|
748
|
+
if (i < until - 1) {
|
|
749
|
+
after = ParserSupport_separation(Prop__get_NewLine(prop), Prop__get_Comment(prop), Prop__get_Trivia(prop));
|
|
750
|
+
} else if (contentFollows) {
|
|
751
|
+
after = ParserSupport_separation(Prop__get_NewLine(prop), Prop__get_Comment(prop), lastFollowing);
|
|
752
|
+
} else {
|
|
753
|
+
const matchValue = Prop__get_Comment(prop);
|
|
754
|
+
after = matchValue == null ? Separation.Inline : Separation_NewLine(new LineBreak(matchValue, empty()));
|
|
755
|
+
}
|
|
756
|
+
void layout.push(new PropertyPlacement(Prop__get_Name(prop), after, Prop__get_Span(prop)));
|
|
757
|
+
}
|
|
758
|
+
return ofSeq(layout);
|
|
759
|
+
}
|
|
760
|
+
function YamlParser__BuildLayout_Z1D062D7F(this$, first, until, lastFollowing, contentFollows) {
|
|
761
|
+
return YamlParser__BuildLayoutOf_610EDFFD(this$, this$.props, first, until, lastFollowing, contentFollows);
|
|
762
|
+
}
|
|
763
|
+
function YamlParser__StartRequest_Z56F48C19(_, newKind, newOwner, newCompact, newIndentless, afterIndicator, startsOnNewLine) {
|
|
764
|
+
_.requested = true;
|
|
765
|
+
_.kind = newKind;
|
|
766
|
+
_.owner = newOwner | 0;
|
|
767
|
+
_.compact = newCompact;
|
|
768
|
+
_.indentless = newIndentless;
|
|
769
|
+
clear(_.props);
|
|
770
|
+
clear(_.lead);
|
|
771
|
+
_.sawNewLine = startsOnNewLine;
|
|
772
|
+
_.indicatorEnd = afterIndicator;
|
|
773
|
+
_.elementNewLine = false;
|
|
774
|
+
_.elementComment = void 0;
|
|
775
|
+
_.indicatorNewLine = false;
|
|
776
|
+
_.indicatorComment = void 0;
|
|
777
|
+
}
|
|
778
|
+
function YamlParser__SetIndicator_Z6A4C9C90(_, sep) {
|
|
779
|
+
const matchValue = _.kind;
|
|
780
|
+
switch (matchValue.tag) {
|
|
781
|
+
case /* Continue */
|
|
782
|
+
5: {
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
case /* Item */
|
|
786
|
+
1: {
|
|
787
|
+
Frame__set_Dash_Z20DDFD6D(item(_.stack.length - 1, _.stack), sep);
|
|
788
|
+
break;
|
|
789
|
+
}
|
|
790
|
+
case /* ExplicitKey */
|
|
791
|
+
3: {
|
|
792
|
+
Frame__set_Question_Z20DDFD6D(item(_.stack.length - 1, _.stack), sep);
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
case /* Value */
|
|
796
|
+
2: {
|
|
797
|
+
Frame__set_Colon_Z20DDFD6D(item(_.stack.length - 1, _.stack), sep);
|
|
798
|
+
break;
|
|
799
|
+
}
|
|
800
|
+
case /* ExplicitValue */
|
|
801
|
+
4: {
|
|
802
|
+
Frame__set_Colon_Z20DDFD6D(item(_.stack.length - 1, _.stack), sep);
|
|
803
|
+
break;
|
|
804
|
+
}
|
|
805
|
+
default:
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
function YamlParser__Deliver_51084C1(_, node) {
|
|
809
|
+
if (_.stack.length === 0) {
|
|
810
|
+
_.docRoot = node;
|
|
811
|
+
} else {
|
|
812
|
+
const top = item(_.stack.length - 1, _.stack);
|
|
813
|
+
const finish = ParserSupport_endOf(node);
|
|
814
|
+
Frame__set_LastEnd_1A8C0E50(top, finish);
|
|
815
|
+
const matchValue = Frame__get_Phase(top);
|
|
816
|
+
switch (matchValue.tag) {
|
|
817
|
+
case /* AfterDash */
|
|
818
|
+
1: {
|
|
819
|
+
void Frame__get_Items(top).push(new SequenceItem(Frame__get_Before(top), Frame__get_Dash(top), node, ParserSupport_spanBetween(Frame__get_EntryStart(top), finish)));
|
|
820
|
+
Frame__set_Phase_1FF842B7(top, Phase.AwaitingEntry);
|
|
821
|
+
break;
|
|
822
|
+
}
|
|
823
|
+
case /* AfterQuestion */
|
|
824
|
+
2: {
|
|
825
|
+
Frame__set_KeyNode_51084C1(top, node);
|
|
826
|
+
Frame__set_Phase_1FF842B7(top, Phase.AwaitingColon);
|
|
827
|
+
break;
|
|
828
|
+
}
|
|
829
|
+
case /* AfterColon */
|
|
830
|
+
4: {
|
|
831
|
+
void Frame__get_Entries(top).push(new MappingEntry(Frame__get_Before(top), Frame__get_Question(top), Frame__get_KeyNode(top), Frame__get_BeforeColon(top), Frame__get_Colon(top), node, ParserSupport_spanBetween(Frame__get_EntryStart(top), finish)));
|
|
832
|
+
Frame__set_Phase_1FF842B7(top, Phase.AwaitingEntry);
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
case /* AwaitingEntry */
|
|
836
|
+
0: {
|
|
837
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A node cannot follow here, because the collection waits for an entry.", ParserSupport_spanAt(finish), empty());
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
case /* AwaitingColon */
|
|
841
|
+
3: {
|
|
842
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A node cannot follow here, because the entry waits for its colon.", ParserSupport_spanAt(finish), empty());
|
|
843
|
+
break;
|
|
844
|
+
}
|
|
845
|
+
default:
|
|
846
|
+
throw new Exception("The parser delivered a block node to a flow frame.");
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
function YamlParser__FinishWithoutValue_21C4FEA5(_, frame) {
|
|
851
|
+
const keyEnd = ParserSupport_endOf(Frame__get_KeyNode(frame));
|
|
852
|
+
void Frame__get_Entries(frame).push(new MappingEntry(Frame__get_Before(frame), Frame__get_Question(frame), Frame__get_KeyNode(frame), empty(), void 0, ParserSupport_missingNode(keyEnd), ParserSupport_spanBetween(Frame__get_EntryStart(frame), keyEnd)));
|
|
853
|
+
Frame__set_Phase_1FF842B7(frame, Phase.AwaitingEntry);
|
|
854
|
+
}
|
|
855
|
+
function YamlParser__CloseTop(this$) {
|
|
856
|
+
const frame = item(this$.stack.length - 1, this$.stack);
|
|
857
|
+
this$.stack.splice(this$.stack.length - 1, 1);
|
|
858
|
+
if (Frame__get_IsMap(frame) && Frame__get_AwaitsColon(frame)) {
|
|
859
|
+
YamlParser__FinishWithoutValue_21C4FEA5(this$, frame);
|
|
860
|
+
}
|
|
861
|
+
YamlParser__Deliver_51084C1(this$, new YamlNode(Frame__get_IsMap(frame) ? YamlNodeKind_Mapping(new Collection$1(CollectionStyle.Block, void 0, ofSeq(Frame__get_Entries(frame)), ofSeq(Frame__get_End(frame)))) : YamlNodeKind_Sequence(new Collection$1(CollectionStyle.Block, void 0, ofSeq(Frame__get_Items(frame)), ofSeq(Frame__get_End(frame)))), new NodeProperties(Frame__get_Tag(frame), Frame__get_Anchor(frame)), Frame__get_Layout(frame), void 0, ParserSupport_spanBetween(Frame__get_Start(frame), Frame__get_LastEnd(frame))));
|
|
862
|
+
}
|
|
863
|
+
function YamlParser__EndMissing(this$) {
|
|
864
|
+
YamlParser__CloseElement(this$);
|
|
865
|
+
const count = this$.props.length | 0;
|
|
866
|
+
if (YamlParser__isContinue(this$)) {
|
|
867
|
+
ParserSupport_failWith(YamlErrorCode.MisplacedProperties, "Properties in front of an entry need a key behind them on the same line.", count > 0 ? Prop__get_Span(item(0, this$.props)) : ParserSupport_spanAt(this$.indicatorEnd), empty());
|
|
868
|
+
}
|
|
869
|
+
const nodeProps = YamlParser__BuildProps_Z37302880(this$, 0, count);
|
|
870
|
+
const layout = YamlParser__BuildLayout_Z1D062D7F(this$, 0, count, empty(), false);
|
|
871
|
+
const leadTrivia = ofSeq(this$.lead);
|
|
872
|
+
const at = count > 0 ? Prop__get_Span(item(count - 1, this$.props)).Finish : this$.indicatorEnd;
|
|
873
|
+
const first = count > 0 ? Prop__get_Span(item(0, this$.props)).Start : this$.indicatorEnd;
|
|
874
|
+
if (YamlParser__isRoot(this$)) {
|
|
875
|
+
addRangeInPlace(this$.lead, this$.docBefore);
|
|
876
|
+
} else {
|
|
877
|
+
YamlParser__SetIndicator_Z6A4C9C90(this$, count > 0 ? ParserSupport_separation(this$.indicatorNewLine, this$.indicatorComment, leadTrivia) : ParserSupport_separation(false, this$.indicatorComment, empty()));
|
|
878
|
+
}
|
|
879
|
+
this$.requested = false;
|
|
880
|
+
const node = ParserSupport_missingNode(at);
|
|
881
|
+
YamlParser__Deliver_51084C1(this$, new YamlNode(node.Kind, nodeProps, layout, node.TrailingComment, ParserSupport_spanBetween(first, at)));
|
|
882
|
+
}
|
|
883
|
+
function YamlParser__CheckAlias_64571AD3(this$, tok, name) {
|
|
884
|
+
if (!this$.anchors.has(name)) {
|
|
885
|
+
ParserSupport_failWith(YamlErrorCode.UndefinedAlias, toText(printf("The alias *%s names no anchor that stands earlier in the document."))(name), tok.Span, empty());
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
function YamlParser__CompleteLeaf_Z340FC327(this$, tok, trailing) {
|
|
889
|
+
YamlParser__CloseElement(this$);
|
|
890
|
+
if (YamlParser__isContinue(this$)) {
|
|
891
|
+
const top = item(this$.stack.length - 1, this$.stack);
|
|
892
|
+
if (Frame__get_IsMap(top)) {
|
|
893
|
+
ParserSupport_failWith(YamlErrorCode.MissingColon, "An implicit key needs a `:` behind it on its line.", tok.Span, ofArray(toArray(Frame__get_FirstKeySpan(top))));
|
|
894
|
+
} else {
|
|
895
|
+
ParserSupport_failWith(YamlErrorCode.MixedCollections, "A sequence takes entries that start with a dash only.", tok.Span, empty());
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
const count = this$.props.length | 0;
|
|
899
|
+
let nodeKind;
|
|
900
|
+
const matchValue = tok.Lexeme;
|
|
901
|
+
switch (matchValue.tag) {
|
|
902
|
+
case /* Alias */
|
|
903
|
+
16: {
|
|
904
|
+
const name = matchValue.fields[0];
|
|
905
|
+
if (count > 0) {
|
|
906
|
+
ParserSupport_failWith(YamlErrorCode.AliasWithProperties, "An alias takes no tag and no anchor.", Prop__get_Span(item(0, this$.props)), singleton(tok.Span));
|
|
907
|
+
}
|
|
908
|
+
YamlParser__CheckAlias_64571AD3(this$, tok, name);
|
|
909
|
+
nodeKind = YamlNodeKind_Alias(name);
|
|
910
|
+
break;
|
|
911
|
+
}
|
|
912
|
+
case /* Scalar */
|
|
913
|
+
18: {
|
|
914
|
+
nodeKind = YamlNodeKind_Scalar(matchValue.fields[0]);
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
case /* FlowSequenceEnd */
|
|
918
|
+
11: {
|
|
919
|
+
nodeKind = this$.flowKind;
|
|
920
|
+
break;
|
|
921
|
+
}
|
|
922
|
+
case /* FlowMappingEnd */
|
|
923
|
+
13: {
|
|
924
|
+
nodeKind = this$.flowKind;
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
927
|
+
default:
|
|
928
|
+
nodeKind = ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A scalar, an alias or a flow collection was expected.", tok.Span, empty());
|
|
929
|
+
}
|
|
930
|
+
const nodeProps = YamlParser__BuildProps_Z37302880(this$, 0, count);
|
|
931
|
+
const following = YamlParser__TakePending(this$);
|
|
932
|
+
const layout = YamlParser__BuildLayout_Z1D062D7F(this$, 0, count, following, true);
|
|
933
|
+
const before = count > 0 ? ofSeq(this$.lead) : following;
|
|
934
|
+
if (YamlParser__isRoot(this$)) {
|
|
935
|
+
addRangeInPlace(before, this$.docBefore);
|
|
936
|
+
} else {
|
|
937
|
+
YamlParser__SetIndicator_Z6A4C9C90(this$, ParserSupport_separation(this$.indicatorNewLine, this$.indicatorComment, before));
|
|
938
|
+
}
|
|
939
|
+
this$.requested = false;
|
|
940
|
+
YamlParser__Deliver_51084C1(this$, new YamlNode(nodeKind, nodeProps, layout, trailing, ParserSupport_spanBetween(count > 0 ? Prop__get_Span(item(0, this$.props)).Start : tok.Span.Start, tok.Span.Finish)));
|
|
941
|
+
}
|
|
942
|
+
function YamlParser__AddKeyEntry_67B4F00(this$, leaf, colon) {
|
|
943
|
+
const isAlias = leaf.Lexeme.tag === /* Alias */
|
|
944
|
+
16;
|
|
945
|
+
if (leaf.Span.Start.Line !== leaf.Span.Finish.Line) {
|
|
946
|
+
ParserSupport_failWith(YamlErrorCode.ImplicitKeyMultiline, "An implicit key has to stay on one line.", leaf.Span, empty());
|
|
947
|
+
}
|
|
948
|
+
YamlParser__CloseElement(this$);
|
|
949
|
+
const count = this$.props.length | 0;
|
|
950
|
+
const own = YamlParser__OwnLineCount(this$) | 0;
|
|
951
|
+
if (isAlias) {
|
|
952
|
+
if (count > own) {
|
|
953
|
+
ParserSupport_failWith(YamlErrorCode.AliasWithProperties, "An alias takes no tag and no anchor.", Prop__get_Span(item(own, this$.props)), singleton(leaf.Span));
|
|
954
|
+
}
|
|
955
|
+
const matchValue_1 = leaf.Lexeme;
|
|
956
|
+
if (matchValue_1.tag === /* Alias */
|
|
957
|
+
16) {
|
|
958
|
+
YamlParser__CheckAlias_64571AD3(this$, leaf, matchValue_1.fields[0]);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
const keyStart = count > own ? Prop__get_Span(item(own, this$.props)).Start : leaf.Span.Start;
|
|
962
|
+
if (count > own ? Prop__get_Tab(item(own, this$.props)) : leaf.Tab) {
|
|
963
|
+
ParserSupport_failWith(YamlErrorCode.TabIndentation, "A tab cannot be part of the indentation in front of a key.", ParserSupport_spanBetween(keyStart, leaf.Span.Finish), empty());
|
|
964
|
+
}
|
|
965
|
+
if (colon.Span.Start.Column - keyStart.Column > 1024) {
|
|
966
|
+
ParserSupport_failWith(YamlErrorCode.ImplicitKeyLength, "An implicit key can have at most 1024 characters, from its properties to its colon.", ParserSupport_spanBetween(keyStart, colon.Span.Start), empty());
|
|
967
|
+
}
|
|
968
|
+
const column = keyStart.Column - 1 | 0;
|
|
969
|
+
let frame = defaultOf();
|
|
970
|
+
if (YamlParser__isContinue(this$)) {
|
|
971
|
+
frame = item(this$.stack.length - 1, this$.stack);
|
|
972
|
+
insertRangeInPlace(0, this$.lead, this$.pending);
|
|
973
|
+
} else {
|
|
974
|
+
if (!this$.sawNewLine && !this$.compact) {
|
|
975
|
+
ParserSupport_failWith(YamlParser__isRoot(this$) ? YamlErrorCode.BlockCollectionOnMarkerLine : YamlErrorCode.BlockCollectionOnKeyLine, "A block mapping cannot start on the line of the indicator in front of it.", ParserSupport_spanBetween(keyStart, colon.Span.Finish), empty());
|
|
976
|
+
}
|
|
977
|
+
const ownProps = YamlParser__BuildProps_Z37302880(this$, 0, own);
|
|
978
|
+
const ownLayout = YamlParser__BuildLayout_Z1D062D7F(this$, 0, own, empty(), true);
|
|
979
|
+
if (own > 0) {
|
|
980
|
+
if (YamlParser__isRoot(this$)) {
|
|
981
|
+
addRangeInPlace(this$.lead, this$.docBefore);
|
|
982
|
+
} else {
|
|
983
|
+
YamlParser__SetIndicator_Z6A4C9C90(this$, ParserSupport_separation(this$.indicatorNewLine, this$.indicatorComment, ofSeq(this$.lead)));
|
|
984
|
+
}
|
|
985
|
+
insertRangeInPlace(0, Prop__get_Trivia(item(own - 1, this$.props)), this$.pending);
|
|
986
|
+
} else {
|
|
987
|
+
if (!YamlParser__isRoot(this$)) {
|
|
988
|
+
YamlParser__SetIndicator_Z6A4C9C90(this$, ParserSupport_separation(this$.indicatorNewLine, this$.indicatorComment, empty()));
|
|
989
|
+
}
|
|
990
|
+
insertRangeInPlace(0, this$.lead, this$.pending);
|
|
991
|
+
}
|
|
992
|
+
const start = own > 0 ? Prop__get_Span(item(0, this$.props)).Start : keyStart;
|
|
993
|
+
frame = Frame_$ctor_Z2E8F49A(true, column, start);
|
|
994
|
+
Frame__set_Tag_FE0ADB0(frame, ownProps.Tag);
|
|
995
|
+
Frame__set_Anchor_6DFDD678(frame, ownProps.Anchor);
|
|
996
|
+
Frame__set_Layout_Z300AE9EC(frame, ownLayout);
|
|
997
|
+
void this$.stack.push(frame);
|
|
998
|
+
}
|
|
999
|
+
const keyProps = YamlParser__BuildProps_Z37302880(this$, own, count);
|
|
1000
|
+
const keyLayout = YamlParser__BuildLayout_Z1D062D7F(this$, own, count, empty(), true);
|
|
1001
|
+
let keyKind;
|
|
1002
|
+
const matchValue_2 = leaf.Lexeme;
|
|
1003
|
+
keyKind = matchValue_2.tag === /* Alias */
|
|
1004
|
+
16 ? YamlNodeKind_Alias(matchValue_2.fields[0]) : matchValue_2.tag === /* Scalar */
|
|
1005
|
+
18 ? YamlNodeKind_Scalar(matchValue_2.fields[0]) : matchValue_2.tag === /* FlowSequenceEnd */
|
|
1006
|
+
11 ? this$.flowKind : matchValue_2.tag === /* FlowMappingEnd */
|
|
1007
|
+
13 ? this$.flowKind : ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A key was expected.", leaf.Span, empty());
|
|
1008
|
+
Frame__set_Before_ZA6FC775(frame, YamlParser__TakePending(this$));
|
|
1009
|
+
Frame__set_EntryStart_1A8C0E50(frame, keyStart);
|
|
1010
|
+
Frame__set_Question_Z20DDFD6D(frame, void 0);
|
|
1011
|
+
Frame__set_BeforeColon_ZA6FC775(frame, empty());
|
|
1012
|
+
Frame__set_KeyNode_51084C1(frame, new YamlNode(keyKind, keyProps, keyLayout, void 0, ParserSupport_spanBetween(keyStart, leaf.Span.Finish)));
|
|
1013
|
+
Frame__set_Phase_1FF842B7(frame, Phase.AfterColon);
|
|
1014
|
+
Frame__set_LastEnd_1A8C0E50(frame, leaf.Span.Finish);
|
|
1015
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.Value, Frame__get_Col(frame), false, true, colon.Span.Finish, false);
|
|
1016
|
+
}
|
|
1017
|
+
function YamlParser__FinishLeaf_9F75402(this$, tok, peek) {
|
|
1018
|
+
let isKey = false;
|
|
1019
|
+
let colon = tok;
|
|
1020
|
+
let trailing = void 0;
|
|
1021
|
+
if (peek) {
|
|
1022
|
+
const next = YamlParser__Next_49318336(this$, YamlParser__RootContext(this$));
|
|
1023
|
+
const matchValue = next.Lexeme;
|
|
1024
|
+
let matchResult = void 0, comment = void 0;
|
|
1025
|
+
switch (matchValue.tag) {
|
|
1026
|
+
case /* Value */
|
|
1027
|
+
9: {
|
|
1028
|
+
matchResult = 0;
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
1031
|
+
case /* Comment */
|
|
1032
|
+
19: {
|
|
1033
|
+
if (matchValue.fields[1]) {
|
|
1034
|
+
matchResult = 2;
|
|
1035
|
+
} else {
|
|
1036
|
+
matchResult = 1;
|
|
1037
|
+
comment = matchValue.fields[0];
|
|
1038
|
+
}
|
|
1039
|
+
break;
|
|
1040
|
+
}
|
|
1041
|
+
default:
|
|
1042
|
+
matchResult = 2;
|
|
1043
|
+
}
|
|
1044
|
+
switch (matchResult) {
|
|
1045
|
+
case 0: {
|
|
1046
|
+
isKey = true;
|
|
1047
|
+
colon = next;
|
|
1048
|
+
break;
|
|
1049
|
+
}
|
|
1050
|
+
case 1: {
|
|
1051
|
+
trailing = comment;
|
|
1052
|
+
break;
|
|
1053
|
+
}
|
|
1054
|
+
case 2: {
|
|
1055
|
+
YamlParser__Unread_Z1030D618(this$, next);
|
|
1056
|
+
break;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
if (isKey) {
|
|
1061
|
+
YamlParser__AddKeyEntry_67B4F00(this$, tok, colon);
|
|
1062
|
+
} else {
|
|
1063
|
+
YamlParser__CompleteLeaf_Z340FC327(this$, tok, trailing);
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
function YamlParser__StartLeaf_Z1030D618(this$, tok) {
|
|
1067
|
+
let matchValue = void 0;
|
|
1068
|
+
if (this$.props.length > 0 && equals(Prop__get_Span(item(this$.props.length - 1, this$.props)).Finish, tok.Span.Start)) {
|
|
1069
|
+
ParserSupport_failWith(YamlErrorCode.MissingSeparation, "A tag or an anchor needs a blank behind it.", tok.Span, singleton(Prop__get_Span(item(this$.props.length - 1, this$.props))));
|
|
1070
|
+
}
|
|
1071
|
+
YamlParser__FinishLeaf_9F75402(this$, tok, !(matchValue = tok.Lexeme, matchValue.tag === /* Scalar */
|
|
1072
|
+
18 && ParserSupport_isBlockScalar(matchValue.fields[0])));
|
|
1073
|
+
}
|
|
1074
|
+
function YamlParser__StartEmptyKey_Z1030D618(this$, colon) {
|
|
1075
|
+
YamlParser__AddKeyEntry_67B4F00(this$, new Tok(Lexeme_Scalar(new YamlScalar("", ScalarStyle.Plain, void 0, void 0)), ParserSupport_spanAt(colon.Span.Start), false), colon);
|
|
1076
|
+
}
|
|
1077
|
+
function YamlParser__StartSequence_Z1030D618(this$, dash) {
|
|
1078
|
+
YamlParser__CloseElement(this$);
|
|
1079
|
+
const count = this$.props.length | 0;
|
|
1080
|
+
const column = dash.Span.Start.Column - 1 | 0;
|
|
1081
|
+
let frame = defaultOf();
|
|
1082
|
+
if (YamlParser__isContinue(this$)) {
|
|
1083
|
+
frame = item(this$.stack.length - 1, this$.stack);
|
|
1084
|
+
if (Frame__get_IsMap(frame)) {
|
|
1085
|
+
ParserSupport_failWith(YamlErrorCode.MixedCollections, "A mapping takes entries that start with a key, and a dash starts a sequence entry.", dash.Span, singleton(Frame__get_FirstSpan(frame)));
|
|
1086
|
+
}
|
|
1087
|
+
} else {
|
|
1088
|
+
if (!this$.sawNewLine && !this$.compact) {
|
|
1089
|
+
ParserSupport_failWith(YamlParser__isRoot(this$) ? YamlErrorCode.BlockCollectionOnMarkerLine : YamlErrorCode.BlockCollectionOnKeyLine, "A block sequence cannot start on the line of the indicator in front of it.", dash.Span, empty());
|
|
1090
|
+
}
|
|
1091
|
+
if (count > 0 && !Prop__get_NewLine(item(count - 1, this$.props))) {
|
|
1092
|
+
ParserSupport_failWith(YamlErrorCode.BlockCollectionOnKeyLine, "The properties of a block sequence stand on a line of their own.", Prop__get_Span(item(count - 1, this$.props)), empty());
|
|
1093
|
+
}
|
|
1094
|
+
const nodeProps = YamlParser__BuildProps_Z37302880(this$, 0, count);
|
|
1095
|
+
const layout = YamlParser__BuildLayout_Z1D062D7F(this$, 0, count, empty(), true);
|
|
1096
|
+
if (YamlParser__isRoot(this$)) {
|
|
1097
|
+
addRangeInPlace(this$.lead, this$.docBefore);
|
|
1098
|
+
} else {
|
|
1099
|
+
YamlParser__SetIndicator_Z6A4C9C90(this$, ParserSupport_separation(this$.indicatorNewLine, this$.indicatorComment, count > 0 ? ofSeq(this$.lead) : empty()));
|
|
1100
|
+
}
|
|
1101
|
+
const start = count > 0 ? Prop__get_Span(item(0, this$.props)).Start : dash.Span.Start;
|
|
1102
|
+
frame = Frame_$ctor_Z2E8F49A(false, column, start);
|
|
1103
|
+
Frame__set_Tag_FE0ADB0(frame, nodeProps.Tag);
|
|
1104
|
+
Frame__set_Anchor_6DFDD678(frame, nodeProps.Anchor);
|
|
1105
|
+
Frame__set_Layout_Z300AE9EC(frame, layout);
|
|
1106
|
+
Frame__set_Indentless_Z1FBCCD16(frame, this$.indentless && this$.sawNewLine && column === this$.owner);
|
|
1107
|
+
void this$.stack.push(frame);
|
|
1108
|
+
}
|
|
1109
|
+
Frame__set_Before_ZA6FC775(frame, YamlParser__TakePending(this$));
|
|
1110
|
+
Frame__set_EntryStart_1A8C0E50(frame, dash.Span.Start);
|
|
1111
|
+
Frame__set_Dash_Z20DDFD6D(frame, void 0);
|
|
1112
|
+
Frame__set_Phase_1FF842B7(frame, Phase.AfterDash);
|
|
1113
|
+
Frame__set_LastEnd_1A8C0E50(frame, dash.Span.Finish);
|
|
1114
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.Item, Frame__get_Col(frame), true, false, dash.Span.Finish, false);
|
|
1115
|
+
}
|
|
1116
|
+
function YamlParser__StartExplicitKey_Z1030D618(this$, question) {
|
|
1117
|
+
YamlParser__CloseElement(this$);
|
|
1118
|
+
const count = this$.props.length | 0;
|
|
1119
|
+
const column = question.Span.Start.Column - 1 | 0;
|
|
1120
|
+
let frame = defaultOf();
|
|
1121
|
+
if (YamlParser__isContinue(this$)) {
|
|
1122
|
+
frame = item(this$.stack.length - 1, this$.stack);
|
|
1123
|
+
if (count > 0) {
|
|
1124
|
+
ParserSupport_failWith(YamlErrorCode.MisplacedProperties, "Properties cannot stand in front of a `?` on the line of an entry.", question.Span, singleton(Prop__get_Span(item(0, this$.props))));
|
|
1125
|
+
}
|
|
1126
|
+
} else {
|
|
1127
|
+
if (!this$.sawNewLine && !this$.compact) {
|
|
1128
|
+
ParserSupport_failWith(YamlParser__isRoot(this$) ? YamlErrorCode.BlockCollectionOnMarkerLine : YamlErrorCode.BlockCollectionOnKeyLine, "A block mapping cannot start on the line of the indicator in front of it.", question.Span, empty());
|
|
1129
|
+
}
|
|
1130
|
+
if (count > 0 && !Prop__get_NewLine(item(count - 1, this$.props))) {
|
|
1131
|
+
ParserSupport_failWith(YamlErrorCode.BlockCollectionOnKeyLine, "The properties of a block mapping stand on a line of their own.", Prop__get_Span(item(count - 1, this$.props)), empty());
|
|
1132
|
+
}
|
|
1133
|
+
const nodeProps = YamlParser__BuildProps_Z37302880(this$, 0, count);
|
|
1134
|
+
const layout = YamlParser__BuildLayout_Z1D062D7F(this$, 0, count, empty(), true);
|
|
1135
|
+
if (YamlParser__isRoot(this$)) {
|
|
1136
|
+
addRangeInPlace(this$.lead, this$.docBefore);
|
|
1137
|
+
} else {
|
|
1138
|
+
YamlParser__SetIndicator_Z6A4C9C90(this$, ParserSupport_separation(this$.indicatorNewLine, this$.indicatorComment, count > 0 ? ofSeq(this$.lead) : empty()));
|
|
1139
|
+
}
|
|
1140
|
+
const start = count > 0 ? Prop__get_Span(item(0, this$.props)).Start : question.Span.Start;
|
|
1141
|
+
frame = Frame_$ctor_Z2E8F49A(true, column, start);
|
|
1142
|
+
Frame__set_Tag_FE0ADB0(frame, nodeProps.Tag);
|
|
1143
|
+
Frame__set_Anchor_6DFDD678(frame, nodeProps.Anchor);
|
|
1144
|
+
Frame__set_Layout_Z300AE9EC(frame, layout);
|
|
1145
|
+
void this$.stack.push(frame);
|
|
1146
|
+
}
|
|
1147
|
+
Frame__set_Before_ZA6FC775(frame, YamlParser__TakePending(this$));
|
|
1148
|
+
Frame__set_EntryStart_1A8C0E50(frame, question.Span.Start);
|
|
1149
|
+
Frame__set_Question_Z20DDFD6D(frame, void 0);
|
|
1150
|
+
Frame__set_BeforeColon_ZA6FC775(frame, empty());
|
|
1151
|
+
Frame__set_Colon_Z20DDFD6D(frame, void 0);
|
|
1152
|
+
Frame__set_Phase_1FF842B7(frame, Phase.AfterQuestion);
|
|
1153
|
+
Frame__set_LastEnd_1A8C0E50(frame, question.Span.Finish);
|
|
1154
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.ExplicitKey, Frame__get_Col(frame), true, true, question.Span.Finish, false);
|
|
1155
|
+
}
|
|
1156
|
+
function YamlParser__NodeStep(this$) {
|
|
1157
|
+
const tok = YamlParser__Next_49318336(this$, YamlParser__NodeContext(this$));
|
|
1158
|
+
const matchValue = tok.Lexeme;
|
|
1159
|
+
switch (matchValue.tag) {
|
|
1160
|
+
case /* Comment */
|
|
1161
|
+
19: {
|
|
1162
|
+
const comment = matchValue.fields[0];
|
|
1163
|
+
if (matchValue.fields[1]) {
|
|
1164
|
+
void this$.pending.push(Trivia_FullLineComment(comment));
|
|
1165
|
+
} else {
|
|
1166
|
+
this$.elementComment = comment;
|
|
1167
|
+
}
|
|
1168
|
+
this$.elementNewLine = true;
|
|
1169
|
+
this$.sawNewLine = true;
|
|
1170
|
+
break;
|
|
1171
|
+
}
|
|
1172
|
+
case /* BlankLine */
|
|
1173
|
+
20: {
|
|
1174
|
+
void this$.pending.push(Trivia_BlankLine(tok.Span));
|
|
1175
|
+
this$.elementNewLine = true;
|
|
1176
|
+
this$.sawNewLine = true;
|
|
1177
|
+
break;
|
|
1178
|
+
}
|
|
1179
|
+
case /* LineStart */
|
|
1180
|
+
6: {
|
|
1181
|
+
const indent = matchValue.fields[0] | 0;
|
|
1182
|
+
this$.elementNewLine = true;
|
|
1183
|
+
this$.sawNewLine = true;
|
|
1184
|
+
if (YamlParser__isContinue(this$)) {
|
|
1185
|
+
ParserSupport_failWith(YamlErrorCode.MisplacedProperties, "Properties in front of an entry need a key behind them on the same line.", tok.Span, singleton(Prop__get_Span(item(0, this$.props))));
|
|
1186
|
+
} else if (indent > this$.owner) {
|
|
1187
|
+
} else if (indent === this$.owner && this$.indentless && nextIsBlockEntry(this$.cursor)) {
|
|
1188
|
+
} else {
|
|
1189
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1190
|
+
YamlParser__EndMissing(this$);
|
|
1191
|
+
}
|
|
1192
|
+
break;
|
|
1193
|
+
}
|
|
1194
|
+
case /* Tag */
|
|
1195
|
+
17: {
|
|
1196
|
+
YamlParser__AddProp_Z1030D618(this$, tok);
|
|
1197
|
+
break;
|
|
1198
|
+
}
|
|
1199
|
+
case /* Anchor */
|
|
1200
|
+
15: {
|
|
1201
|
+
YamlParser__AddProp_Z1030D618(this$, tok);
|
|
1202
|
+
break;
|
|
1203
|
+
}
|
|
1204
|
+
case /* Scalar */
|
|
1205
|
+
18: {
|
|
1206
|
+
YamlParser__StartLeaf_Z1030D618(this$, tok);
|
|
1207
|
+
break;
|
|
1208
|
+
}
|
|
1209
|
+
case /* Alias */
|
|
1210
|
+
16: {
|
|
1211
|
+
YamlParser__StartLeaf_Z1030D618(this$, tok);
|
|
1212
|
+
break;
|
|
1213
|
+
}
|
|
1214
|
+
case /* BlockEntry */
|
|
1215
|
+
7: {
|
|
1216
|
+
YamlParser__StartSequence_Z1030D618(this$, tok);
|
|
1217
|
+
break;
|
|
1218
|
+
}
|
|
1219
|
+
case /* ExplicitKey */
|
|
1220
|
+
8: {
|
|
1221
|
+
YamlParser__StartExplicitKey_Z1030D618(this$, tok);
|
|
1222
|
+
break;
|
|
1223
|
+
}
|
|
1224
|
+
case /* Value */
|
|
1225
|
+
9: {
|
|
1226
|
+
YamlParser__StartEmptyKey_Z1030D618(this$, tok);
|
|
1227
|
+
break;
|
|
1228
|
+
}
|
|
1229
|
+
case /* FlowSequenceStart */
|
|
1230
|
+
10: {
|
|
1231
|
+
YamlParser__OpenOutermost_Z1030D618(this$, tok);
|
|
1232
|
+
break;
|
|
1233
|
+
}
|
|
1234
|
+
case /* FlowMappingStart */
|
|
1235
|
+
12: {
|
|
1236
|
+
YamlParser__OpenOutermost_Z1030D618(this$, tok);
|
|
1237
|
+
break;
|
|
1238
|
+
}
|
|
1239
|
+
case /* ByteOrderMark */
|
|
1240
|
+
4: {
|
|
1241
|
+
this$.elementNewLine = true;
|
|
1242
|
+
this$.sawNewLine = true;
|
|
1243
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1244
|
+
YamlParser__EndMissing(this$);
|
|
1245
|
+
break;
|
|
1246
|
+
}
|
|
1247
|
+
case /* DocumentStart */
|
|
1248
|
+
2: {
|
|
1249
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1250
|
+
YamlParser__EndMissing(this$);
|
|
1251
|
+
break;
|
|
1252
|
+
}
|
|
1253
|
+
case /* DocumentEnd */
|
|
1254
|
+
3: {
|
|
1255
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1256
|
+
YamlParser__EndMissing(this$);
|
|
1257
|
+
break;
|
|
1258
|
+
}
|
|
1259
|
+
case /* StreamEnd */
|
|
1260
|
+
1: {
|
|
1261
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1262
|
+
YamlParser__EndMissing(this$);
|
|
1263
|
+
break;
|
|
1264
|
+
}
|
|
1265
|
+
case /* Directive */
|
|
1266
|
+
5: {
|
|
1267
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1268
|
+
YamlParser__EndMissing(this$);
|
|
1269
|
+
break;
|
|
1270
|
+
}
|
|
1271
|
+
default:
|
|
1272
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "This token cannot start a node.", tok.Span, empty());
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
function YamlParser__FlowContext(_) {
|
|
1276
|
+
return new LexContext(GrammarContext.FlowIn, _.flowOwner, false);
|
|
1277
|
+
}
|
|
1278
|
+
function YamlParser__FlowGap_1A8C0E50(this$, previousEnd) {
|
|
1279
|
+
const context = YamlParser__FlowContext(this$);
|
|
1280
|
+
const held = this$.pending.length | 0;
|
|
1281
|
+
this$.gapComment = void 0;
|
|
1282
|
+
let tok = YamlParser__Next_49318336(this$, context);
|
|
1283
|
+
const matchValue = tok.Lexeme;
|
|
1284
|
+
let matchResult = void 0, comment = void 0;
|
|
1285
|
+
if (matchValue.tag === /* Comment */
|
|
1286
|
+
19) {
|
|
1287
|
+
if (matchValue.fields[1]) {
|
|
1288
|
+
matchResult = 1;
|
|
1289
|
+
} else {
|
|
1290
|
+
matchResult = 0;
|
|
1291
|
+
comment = matchValue.fields[0];
|
|
1292
|
+
}
|
|
1293
|
+
} else {
|
|
1294
|
+
matchResult = 1;
|
|
1295
|
+
}
|
|
1296
|
+
switch (matchResult) {
|
|
1297
|
+
case 0: {
|
|
1298
|
+
this$.gapComment = comment;
|
|
1299
|
+
tok = YamlParser__Next_49318336(this$, context);
|
|
1300
|
+
break;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
let reading = true;
|
|
1304
|
+
while (reading) {
|
|
1305
|
+
const matchValue_1 = tok.Lexeme;
|
|
1306
|
+
switch (matchValue_1.tag) {
|
|
1307
|
+
case /* Comment */
|
|
1308
|
+
19: {
|
|
1309
|
+
const comment_1 = matchValue_1.fields[0];
|
|
1310
|
+
void this$.pending.push(Trivia_FullLineComment(comment_1));
|
|
1311
|
+
tok = YamlParser__Next_49318336(this$, context);
|
|
1312
|
+
break;
|
|
1313
|
+
}
|
|
1314
|
+
case /* BlankLine */
|
|
1315
|
+
20: {
|
|
1316
|
+
void this$.pending.push(Trivia_BlankLine(tok.Span));
|
|
1317
|
+
tok = YamlParser__Next_49318336(this$, context);
|
|
1318
|
+
break;
|
|
1319
|
+
}
|
|
1320
|
+
default:
|
|
1321
|
+
reading = false;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
this$.gapNewLine = (this$.gapComment != null ? true : this$.pending.length > held) ? true : tok.Span.Start.Line > previousEnd.Line;
|
|
1325
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1326
|
+
this$.gapReady = true;
|
|
1327
|
+
}
|
|
1328
|
+
function YamlParser__FlowTake_1A8C0E50(this$, previousEnd) {
|
|
1329
|
+
if (!this$.gapReady) {
|
|
1330
|
+
YamlParser__FlowGap_1A8C0E50(this$, previousEnd);
|
|
1331
|
+
}
|
|
1332
|
+
this$.gapReady = false;
|
|
1333
|
+
return YamlParser__Next_49318336(this$, YamlParser__FlowContext(this$));
|
|
1334
|
+
}
|
|
1335
|
+
function YamlParser__FlowUnread_Z1030D618(this$, tok) {
|
|
1336
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
1337
|
+
this$.gapReady = true;
|
|
1338
|
+
}
|
|
1339
|
+
function YamlParser__LineStart_Z524259A4(_, line) {
|
|
1340
|
+
if (_.lineStarts == null) {
|
|
1341
|
+
const text = Cursor__get_Text(_.cursor);
|
|
1342
|
+
const starts = [];
|
|
1343
|
+
void starts.push(Cursor__get_Origin(_.cursor));
|
|
1344
|
+
let i = Cursor__get_Origin(_.cursor);
|
|
1345
|
+
while (i < text.length) {
|
|
1346
|
+
if (getCharAtIndex(text, i) === "\n") {
|
|
1347
|
+
void starts.push(i + 1);
|
|
1348
|
+
} else if (getCharAtIndex(text, i) === "\r") {
|
|
1349
|
+
if (i + 1 < text.length && getCharAtIndex(text, i + 1) === "\n") {
|
|
1350
|
+
i = i + 1 | 0;
|
|
1351
|
+
}
|
|
1352
|
+
void starts.push(i + 1);
|
|
1353
|
+
}
|
|
1354
|
+
i = i + 1 | 0;
|
|
1355
|
+
}
|
|
1356
|
+
_.lineStarts = starts.slice();
|
|
1357
|
+
}
|
|
1358
|
+
return item(line - 1, _.lineStarts) | 0;
|
|
1359
|
+
}
|
|
1360
|
+
function YamlParser__CheckFlowKeyLines_Z637FBEC7(this$, key, keyEnd, colon) {
|
|
1361
|
+
let keySpan;
|
|
1362
|
+
const matchValue = key.Span;
|
|
1363
|
+
keySpan = matchValue == null ? ParserSupport_spanAt(keyEnd) : matchValue;
|
|
1364
|
+
if (colon.Span.Start.Line > keySpan.Start.Line && this$.flowOwner >= 0) {
|
|
1365
|
+
const text = Cursor__get_Text(this$.cursor);
|
|
1366
|
+
for (let line = keySpan.Start.Line; line <= colon.Span.Start.Line; line++) {
|
|
1367
|
+
const start = YamlParser__LineStart_Z524259A4(this$, line) | 0;
|
|
1368
|
+
let spaces = start;
|
|
1369
|
+
while (spaces < text.length && getCharAtIndex(text, spaces) === " ") {
|
|
1370
|
+
spaces = spaces + 1 | 0;
|
|
1371
|
+
}
|
|
1372
|
+
let content = spaces;
|
|
1373
|
+
while (content < text.length && (getCharAtIndex(text, content) === " " ? true : getCharAtIndex(text, content) === " ")) {
|
|
1374
|
+
content = content + 1 | 0;
|
|
1375
|
+
}
|
|
1376
|
+
const blank = (content >= text.length ? true : getCharAtIndex(text, content) === "\n") ? true : getCharAtIndex(text, content) === "\r";
|
|
1377
|
+
const comment = line > keySpan.Finish.Line && !blank && getCharAtIndex(text, content) === "#";
|
|
1378
|
+
if ((line > keySpan.Start.Line ? true : keySpan.Start.Column - 1 === content - start) && !blank && !comment && spaces - start <= this$.flowOwner) {
|
|
1379
|
+
ParserSupport_failWith(YamlErrorCode.ImplicitKeyMultiline, "A key of a flow mapping entry over several lines, or with its colon on a later line, has to be indented deeper than the node that owns the collection.", keySpan, empty());
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
function YamlParser__FlowName_21C4FEA5(_, top) {
|
|
1385
|
+
if (equals(Frame__get_Kind(top), FrameKind.FlowMapping)) {
|
|
1386
|
+
return "mapping";
|
|
1387
|
+
} else {
|
|
1388
|
+
return "sequence";
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
function YamlParser__FailUnclosed_40F14AEC(this$, top, at) {
|
|
1392
|
+
let arg = void 0, arg_1 = void 0;
|
|
1393
|
+
ParserSupport_failWith(YamlErrorCode.UnclosedFlow, (arg = YamlParser__FlowName_21C4FEA5(this$, top), arg_1 = Frame__get_Opener(top).Start.Line | 0, toText(printf("The flow %s that starts on line %d is not closed."))(arg)(arg_1)), at, singleton(Frame__get_Opener(top)));
|
|
1394
|
+
}
|
|
1395
|
+
function YamlParser__FailMismatch_Z4A540553(this$, top, closer) {
|
|
1396
|
+
let arg_1 = void 0, arg_2 = void 0;
|
|
1397
|
+
const text = closer.Lexeme.tag === /* FlowSequenceEnd */
|
|
1398
|
+
11 ? "]" : "}";
|
|
1399
|
+
ParserSupport_failWith(YamlErrorCode.MismatchedFlowCloser, (arg_1 = YamlParser__FlowName_21C4FEA5(this$, top), arg_2 = Frame__get_Opener(top).Start.Line | 0, toText(printf("A `%s` cannot close the flow %s that starts on line %d."))(text)(arg_1)(arg_2)), closer.Span, singleton(Frame__get_Opener(top)));
|
|
1400
|
+
}
|
|
1401
|
+
function YamlParser__CloserMatches_Z4A540553(_, top, closer) {
|
|
1402
|
+
const matchValue = closer.Lexeme;
|
|
1403
|
+
switch (matchValue.tag) {
|
|
1404
|
+
case /* FlowSequenceEnd */
|
|
1405
|
+
11:
|
|
1406
|
+
return !equals(Frame__get_Kind(top), FrameKind.FlowMapping);
|
|
1407
|
+
case /* FlowMappingEnd */
|
|
1408
|
+
13:
|
|
1409
|
+
return equals(Frame__get_Kind(top), FrameKind.FlowMapping);
|
|
1410
|
+
default:
|
|
1411
|
+
return false;
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
function YamlParser__OpenOutermost_Z1030D618(this$, opener) {
|
|
1415
|
+
if (this$.props.length > 0 && equals(Prop__get_Span(item(this$.props.length - 1, this$.props)).Finish, opener.Span.Start)) {
|
|
1416
|
+
ParserSupport_failWith(YamlErrorCode.MissingSeparation, "A tag or an anchor needs a blank behind it.", opener.Span, singleton(Prop__get_Span(item(this$.props.length - 1, this$.props))));
|
|
1417
|
+
}
|
|
1418
|
+
this$.flowOwner = YamlParser__NodeContext(this$).ParentIndent | 0;
|
|
1419
|
+
YamlParser__PushFlow_40F31829(this$, opener, YamlParser__TakePending(this$), true);
|
|
1420
|
+
}
|
|
1421
|
+
function YamlParser__PushFlow_40F31829(this$, opener, following, outermost) {
|
|
1422
|
+
const isMap = opener.Lexeme.tag === /* FlowMappingStart */
|
|
1423
|
+
12;
|
|
1424
|
+
const count = (outermost ? 0 : this$.flowProps.length) | 0;
|
|
1425
|
+
const frame = Frame_$ctor_Z2E8F49A(isMap, -1, count > 0 ? Prop__get_Span(item(0, this$.flowProps)).Start : opener.Span.Start);
|
|
1426
|
+
Frame__set_Kind_639F076D(frame, isMap ? FrameKind.FlowMapping : FrameKind.FlowSequence);
|
|
1427
|
+
Frame__set_Phase_1FF842B7(frame, isMap ? Phase.FlowEntry : Phase.FlowItem);
|
|
1428
|
+
Frame__set_Opener_1A9599A9(frame, opener.Span);
|
|
1429
|
+
Frame__set_OpenerTab_Z1FBCCD16(frame, opener.Tab);
|
|
1430
|
+
Frame__set_Outermost_Z1FBCCD16(frame, outermost);
|
|
1431
|
+
Frame__set_PendEnd_1A8C0E50(frame, opener.Span.Finish);
|
|
1432
|
+
Frame__set_LastEnd_1A8C0E50(frame, opener.Span.Finish);
|
|
1433
|
+
if (outermost) {
|
|
1434
|
+
Frame__set_Following_ZA6FC775(frame, following);
|
|
1435
|
+
} else if (count > 0) {
|
|
1436
|
+
const nodeProps = YamlParser__BuildPropsOf_Z648DC8C4(this$, this$.flowProps, 0, count);
|
|
1437
|
+
Frame__set_Tag_FE0ADB0(frame, nodeProps.Tag);
|
|
1438
|
+
Frame__set_Anchor_6DFDD678(frame, nodeProps.Anchor);
|
|
1439
|
+
Frame__set_Layout_Z300AE9EC(frame, YamlParser__BuildLayoutOf_610EDFFD(this$, this$.flowProps, 0, count, following, true));
|
|
1440
|
+
}
|
|
1441
|
+
void this$.stack.push(frame);
|
|
1442
|
+
this$.flowCount = this$.flowCount + 1 | 0;
|
|
1443
|
+
YamlParser__FlowGap_1A8C0E50(this$, opener.Span.Finish);
|
|
1444
|
+
Frame__set_OpeningComment_22445A31(frame, this$.gapComment);
|
|
1445
|
+
this$.gapComment = void 0;
|
|
1446
|
+
}
|
|
1447
|
+
function YamlParser__FlowStep(this$) {
|
|
1448
|
+
const top = item(this$.stack.length - 1, this$.stack);
|
|
1449
|
+
const matchValue = Frame__get_Phase(top);
|
|
1450
|
+
switch (matchValue.tag) {
|
|
1451
|
+
case /* FlowItem */
|
|
1452
|
+
5: {
|
|
1453
|
+
YamlParser__FlowItemStep_21C4FEA5(this$, top);
|
|
1454
|
+
break;
|
|
1455
|
+
}
|
|
1456
|
+
case /* FlowAfterItem */
|
|
1457
|
+
6: {
|
|
1458
|
+
YamlParser__FlowAfterItemStep_21C4FEA5(this$, top);
|
|
1459
|
+
break;
|
|
1460
|
+
}
|
|
1461
|
+
case /* FlowEntry */
|
|
1462
|
+
7: {
|
|
1463
|
+
YamlParser__FlowEntryStep_21C4FEA5(this$, top);
|
|
1464
|
+
break;
|
|
1465
|
+
}
|
|
1466
|
+
case /* FlowQuestion */
|
|
1467
|
+
8: {
|
|
1468
|
+
YamlParser__FlowNode_Z4A540553(this$, top, YamlParser__FlowTake_1A8C0E50(this$, Frame__get_LastEnd(top)));
|
|
1469
|
+
break;
|
|
1470
|
+
}
|
|
1471
|
+
case /* FlowColon */
|
|
1472
|
+
10: {
|
|
1473
|
+
YamlParser__FlowNode_Z4A540553(this$, top, YamlParser__FlowTake_1A8C0E50(this$, Frame__get_LastEnd(top)));
|
|
1474
|
+
break;
|
|
1475
|
+
}
|
|
1476
|
+
case /* FlowAfterKey */
|
|
1477
|
+
9: {
|
|
1478
|
+
YamlParser__FlowAfterKeyStep_21C4FEA5(this$, top);
|
|
1479
|
+
break;
|
|
1480
|
+
}
|
|
1481
|
+
case /* FlowAfterValue */
|
|
1482
|
+
11: {
|
|
1483
|
+
YamlParser__FlowAfterValueStep_21C4FEA5(this$, top);
|
|
1484
|
+
break;
|
|
1485
|
+
}
|
|
1486
|
+
default:
|
|
1487
|
+
throw new Exception("The parser reached a flow step on a block frame.");
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
function YamlParser__SetFlowIndicator_Z30284FCB(_, top, sep) {
|
|
1491
|
+
const matchValue = Frame__get_Phase(top);
|
|
1492
|
+
switch (matchValue.tag) {
|
|
1493
|
+
case /* FlowQuestion */
|
|
1494
|
+
8: {
|
|
1495
|
+
Frame__set_Question_Z20DDFD6D(top, sep);
|
|
1496
|
+
break;
|
|
1497
|
+
}
|
|
1498
|
+
case /* FlowColon */
|
|
1499
|
+
10: {
|
|
1500
|
+
Frame__set_Colon_Z20DDFD6D(top, sep);
|
|
1501
|
+
break;
|
|
1502
|
+
}
|
|
1503
|
+
default:
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
function YamlParser__FlowDeliver_5F745784(_, top, node) {
|
|
1507
|
+
Frame__set_Pend_51084C1(top, node);
|
|
1508
|
+
Frame__set_PendEnd_1A8C0E50(top, ParserSupport_endOf(node));
|
|
1509
|
+
const matchValue = Frame__get_Phase(top);
|
|
1510
|
+
switch (matchValue.tag) {
|
|
1511
|
+
case /* FlowItem */
|
|
1512
|
+
5: {
|
|
1513
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowAfterItem);
|
|
1514
|
+
break;
|
|
1515
|
+
}
|
|
1516
|
+
case /* FlowEntry */
|
|
1517
|
+
7: {
|
|
1518
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowAfterKey);
|
|
1519
|
+
break;
|
|
1520
|
+
}
|
|
1521
|
+
case /* FlowQuestion */
|
|
1522
|
+
8: {
|
|
1523
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowAfterKey);
|
|
1524
|
+
break;
|
|
1525
|
+
}
|
|
1526
|
+
case /* FlowColon */
|
|
1527
|
+
10: {
|
|
1528
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowAfterValue);
|
|
1529
|
+
break;
|
|
1530
|
+
}
|
|
1531
|
+
default:
|
|
1532
|
+
throw new Exception("The parser delivered a flow node to a frame that waits for no node.");
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
function YamlParser__FlowItemStep_21C4FEA5(this$, top) {
|
|
1536
|
+
const tok = YamlParser__FlowTake_1A8C0E50(this$, Frame__get_LastEnd(top));
|
|
1537
|
+
const matchValue = tok.Lexeme;
|
|
1538
|
+
switch (matchValue.tag) {
|
|
1539
|
+
case /* FlowSequenceEnd */
|
|
1540
|
+
11: {
|
|
1541
|
+
YamlParser__CloseFlow_Z4A540553(this$, top, tok);
|
|
1542
|
+
break;
|
|
1543
|
+
}
|
|
1544
|
+
case /* FlowMappingEnd */
|
|
1545
|
+
13: {
|
|
1546
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, tok);
|
|
1547
|
+
break;
|
|
1548
|
+
}
|
|
1549
|
+
case /* FlowEntry */
|
|
1550
|
+
14: {
|
|
1551
|
+
ParserSupport_failWith(YamlErrorCode.EmptyFlowEntry, "A `,` needs an entry in front of it.", tok.Span, singleton(Frame__get_Opener(top)));
|
|
1552
|
+
break;
|
|
1553
|
+
}
|
|
1554
|
+
case /* ExplicitKey */
|
|
1555
|
+
8: {
|
|
1556
|
+
YamlParser__StartPair_Z4A540553(this$, top, tok);
|
|
1557
|
+
break;
|
|
1558
|
+
}
|
|
1559
|
+
case /* Value */
|
|
1560
|
+
9: {
|
|
1561
|
+
YamlParser__StartPair_Z4A540553(this$, top, tok);
|
|
1562
|
+
break;
|
|
1563
|
+
}
|
|
1564
|
+
case /* StreamEnd */
|
|
1565
|
+
1: {
|
|
1566
|
+
YamlParser__FailUnclosed_40F14AEC(this$, top, tok.Span);
|
|
1567
|
+
break;
|
|
1568
|
+
}
|
|
1569
|
+
default: {
|
|
1570
|
+
Frame__set_Before_ZA6FC775(top, YamlParser__TakePending(this$));
|
|
1571
|
+
Frame__set_EntryStart_1A8C0E50(top, tok.Span.Start);
|
|
1572
|
+
YamlParser__FlowNode_Z4A540553(this$, top, tok);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
function YamlParser__StartPair_Z4A540553(this$, sequence, indicator) {
|
|
1577
|
+
Frame__set_Before_ZA6FC775(sequence, YamlParser__TakePending(this$));
|
|
1578
|
+
const pair = Frame_$ctor_Z2E8F49A(true, -1, indicator.Span.Start);
|
|
1579
|
+
Frame__set_Kind_639F076D(pair, FrameKind.FlowPair);
|
|
1580
|
+
Frame__set_Opener_1A9599A9(pair, Frame__get_Opener(sequence));
|
|
1581
|
+
Frame__set_EntryStart_1A8C0E50(pair, indicator.Span.Start);
|
|
1582
|
+
Frame__set_LastEnd_1A8C0E50(pair, indicator.Span.Finish);
|
|
1583
|
+
if (indicator.Lexeme.tag === /* ExplicitKey */
|
|
1584
|
+
8) {
|
|
1585
|
+
Frame__set_Phase_1FF842B7(pair, Phase.FlowQuestion);
|
|
1586
|
+
} else {
|
|
1587
|
+
Frame__set_KeyNode_51084C1(pair, ParserSupport_missingNode(indicator.Span.Start));
|
|
1588
|
+
Frame__set_Phase_1FF842B7(pair, Phase.FlowColon);
|
|
1589
|
+
}
|
|
1590
|
+
void this$.stack.push(pair);
|
|
1591
|
+
this$.flowCount = this$.flowCount + 1 | 0;
|
|
1592
|
+
YamlParser__FlowGap_1A8C0E50(this$, indicator.Span.Finish);
|
|
1593
|
+
}
|
|
1594
|
+
function YamlParser__FlowAfterItemStep_21C4FEA5(this$, top) {
|
|
1595
|
+
const tok = YamlParser__FlowTake_1A8C0E50(this$, Frame__get_PendEnd(top));
|
|
1596
|
+
const comment = this$.gapComment;
|
|
1597
|
+
this$.gapComment = void 0;
|
|
1598
|
+
const matchValue = tok.Lexeme;
|
|
1599
|
+
switch (matchValue.tag) {
|
|
1600
|
+
case /* FlowEntry */
|
|
1601
|
+
14: {
|
|
1602
|
+
YamlParser__AddItem_78208974(this$, top, YamlParser__FlowAfterComma_78012589(this$, tok, Frame__get_PendEnd(top), comment));
|
|
1603
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowItem);
|
|
1604
|
+
break;
|
|
1605
|
+
}
|
|
1606
|
+
case /* FlowSequenceEnd */
|
|
1607
|
+
11: {
|
|
1608
|
+
YamlParser__AddItem_78208974(this$, top, comment);
|
|
1609
|
+
YamlParser__CloseFlow_Z4A540553(this$, top, tok);
|
|
1610
|
+
break;
|
|
1611
|
+
}
|
|
1612
|
+
case /* FlowMappingEnd */
|
|
1613
|
+
13: {
|
|
1614
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, tok);
|
|
1615
|
+
break;
|
|
1616
|
+
}
|
|
1617
|
+
case /* Value */
|
|
1618
|
+
9: {
|
|
1619
|
+
YamlParser__ConvertToPair_496F0A7C(this$, top, tok, comment);
|
|
1620
|
+
break;
|
|
1621
|
+
}
|
|
1622
|
+
case /* StreamEnd */
|
|
1623
|
+
1: {
|
|
1624
|
+
YamlParser__FailUnclosed_40F14AEC(this$, top, tok.Span);
|
|
1625
|
+
break;
|
|
1626
|
+
}
|
|
1627
|
+
default:
|
|
1628
|
+
ParserSupport_failWith(YamlErrorCode.MissingFlowComma, "Two entries of a flow collection need a `,` between them.", tok.Span, singleton(Frame__get_Opener(top)));
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
function YamlParser__AddItem_78208974(_, top, trailing) {
|
|
1632
|
+
let node;
|
|
1633
|
+
const bind$0040 = Frame__get_Pend(top);
|
|
1634
|
+
node = new YamlNode(bind$0040.Kind, bind$0040.Properties, bind$0040.PropertyLayout, trailing, bind$0040.Span);
|
|
1635
|
+
void Frame__get_Items(top).push(new SequenceItem(Frame__get_Before(top), void 0, node, ParserSupport_spanBetween(Frame__get_EntryStart(top), Frame__get_PendEnd(top))));
|
|
1636
|
+
}
|
|
1637
|
+
function YamlParser__ConvertToPair_496F0A7C(this$, sequence, colon, comment) {
|
|
1638
|
+
const key = Frame__get_Pend(sequence);
|
|
1639
|
+
let keySpan;
|
|
1640
|
+
const matchValue = key.Span;
|
|
1641
|
+
keySpan = matchValue == null ? ParserSupport_spanAt(Frame__get_PendEnd(sequence)) : matchValue;
|
|
1642
|
+
if ((comment != null ? true : this$.gapNewLine) ? true : keySpan.Start.Line !== keySpan.Finish.Line) {
|
|
1643
|
+
ParserSupport_failWith(YamlErrorCode.ImplicitKeyMultiline, "The key of a flow pair has to stand on one line with its colon.", keySpan, empty());
|
|
1644
|
+
}
|
|
1645
|
+
if (colon.Span.Start.Column - keySpan.Start.Column > 1024) {
|
|
1646
|
+
ParserSupport_failWith(YamlErrorCode.ImplicitKeyLength, "An implicit key can have at most 1024 characters, from its properties to its colon.", ParserSupport_spanBetween(keySpan.Start, colon.Span.Start), empty());
|
|
1647
|
+
}
|
|
1648
|
+
const pair = Frame_$ctor_Z2E8F49A(true, -1, keySpan.Start);
|
|
1649
|
+
Frame__set_Kind_639F076D(pair, FrameKind.FlowPair);
|
|
1650
|
+
Frame__set_Opener_1A9599A9(pair, Frame__get_Opener(sequence));
|
|
1651
|
+
Frame__set_EntryStart_1A8C0E50(pair, keySpan.Start);
|
|
1652
|
+
Frame__set_KeyNode_51084C1(pair, key);
|
|
1653
|
+
Frame__set_LastEnd_1A8C0E50(pair, colon.Span.Finish);
|
|
1654
|
+
Frame__set_Phase_1FF842B7(pair, Phase.FlowColon);
|
|
1655
|
+
void this$.stack.push(pair);
|
|
1656
|
+
this$.flowCount = this$.flowCount + 1 | 0;
|
|
1657
|
+
YamlParser__FlowGap_1A8C0E50(this$, colon.Span.Finish);
|
|
1658
|
+
}
|
|
1659
|
+
function YamlParser__FlowAfterComma_78012589(this$, comma, nodeEnd, comment) {
|
|
1660
|
+
const held = this$.pending.length | 0;
|
|
1661
|
+
YamlParser__FlowGap_1A8C0E50(this$, comma.Span.Finish);
|
|
1662
|
+
const behind = this$.gapComment;
|
|
1663
|
+
this$.gapComment = void 0;
|
|
1664
|
+
if (comment == null) {
|
|
1665
|
+
if (behind == null) {
|
|
1666
|
+
return void 0;
|
|
1667
|
+
} else {
|
|
1668
|
+
const extra_1 = behind;
|
|
1669
|
+
if (comma.Span.Start.Line === nodeEnd.Line) {
|
|
1670
|
+
return behind;
|
|
1671
|
+
} else {
|
|
1672
|
+
this$.pending.splice(held, 0, Trivia_FullLineComment(extra_1));
|
|
1673
|
+
return void 0;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
} else {
|
|
1677
|
+
if (behind == null) {
|
|
1678
|
+
} else {
|
|
1679
|
+
const extra = behind;
|
|
1680
|
+
this$.pending.splice(held, 0, Trivia_FullLineComment(extra));
|
|
1681
|
+
}
|
|
1682
|
+
return comment;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
function YamlParser__FlowEntryStep_21C4FEA5(this$, top) {
|
|
1686
|
+
const tok = YamlParser__FlowTake_1A8C0E50(this$, Frame__get_LastEnd(top));
|
|
1687
|
+
const matchValue = tok.Lexeme;
|
|
1688
|
+
switch (matchValue.tag) {
|
|
1689
|
+
case /* FlowMappingEnd */
|
|
1690
|
+
13: {
|
|
1691
|
+
YamlParser__CloseFlow_Z4A540553(this$, top, tok);
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
case /* FlowSequenceEnd */
|
|
1695
|
+
11: {
|
|
1696
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, tok);
|
|
1697
|
+
break;
|
|
1698
|
+
}
|
|
1699
|
+
case /* FlowEntry */
|
|
1700
|
+
14: {
|
|
1701
|
+
ParserSupport_failWith(YamlErrorCode.EmptyFlowEntry, "A `,` needs an entry in front of it.", tok.Span, singleton(Frame__get_Opener(top)));
|
|
1702
|
+
break;
|
|
1703
|
+
}
|
|
1704
|
+
case /* StreamEnd */
|
|
1705
|
+
1: {
|
|
1706
|
+
YamlParser__FailUnclosed_40F14AEC(this$, top, tok.Span);
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
default: {
|
|
1710
|
+
Frame__set_Before_ZA6FC775(top, YamlParser__TakePending(this$));
|
|
1711
|
+
Frame__set_EntryStart_1A8C0E50(top, tok.Span.Start);
|
|
1712
|
+
Frame__set_Question_Z20DDFD6D(top, void 0);
|
|
1713
|
+
Frame__set_Colon_Z20DDFD6D(top, void 0);
|
|
1714
|
+
Frame__set_BeforeColon_ZA6FC775(top, empty());
|
|
1715
|
+
const matchValue_1 = tok.Lexeme;
|
|
1716
|
+
switch (matchValue_1.tag) {
|
|
1717
|
+
case /* ExplicitKey */
|
|
1718
|
+
8: {
|
|
1719
|
+
Frame__set_LastEnd_1A8C0E50(top, tok.Span.Finish);
|
|
1720
|
+
YamlParser__FlowGap_1A8C0E50(this$, tok.Span.Finish);
|
|
1721
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowQuestion);
|
|
1722
|
+
break;
|
|
1723
|
+
}
|
|
1724
|
+
case /* Value */
|
|
1725
|
+
9: {
|
|
1726
|
+
Frame__set_KeyNode_51084C1(top, ParserSupport_missingNode(tok.Span.Start));
|
|
1727
|
+
Frame__set_LastEnd_1A8C0E50(top, tok.Span.Finish);
|
|
1728
|
+
YamlParser__FlowGap_1A8C0E50(this$, tok.Span.Finish);
|
|
1729
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowColon);
|
|
1730
|
+
break;
|
|
1731
|
+
}
|
|
1732
|
+
default:
|
|
1733
|
+
YamlParser__FlowNode_Z4A540553(this$, top, tok);
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
function YamlParser__FlowNode_Z4A540553(this$, top, first) {
|
|
1739
|
+
let hasIndicator;
|
|
1740
|
+
const matchValue = Frame__get_Phase(top);
|
|
1741
|
+
hasIndicator = matchValue.tag === /* FlowQuestion */
|
|
1742
|
+
8 ? true : matchValue.tag === /* FlowColon */
|
|
1743
|
+
10;
|
|
1744
|
+
this$.flowIndicatorNewLine = hasIndicator && this$.gapNewLine;
|
|
1745
|
+
this$.flowIndicatorComment = hasIndicator ? this$.gapComment : void 0;
|
|
1746
|
+
this$.gapComment = void 0;
|
|
1747
|
+
this$.flowLead = empty();
|
|
1748
|
+
this$.flowNewLine = false;
|
|
1749
|
+
this$.flowComment = void 0;
|
|
1750
|
+
clear(this$.flowProps);
|
|
1751
|
+
let tok = first;
|
|
1752
|
+
let reading = true;
|
|
1753
|
+
while (reading) {
|
|
1754
|
+
const matchValue_1 = tok.Lexeme;
|
|
1755
|
+
switch (matchValue_1.tag) {
|
|
1756
|
+
case /* Tag */
|
|
1757
|
+
17:
|
|
1758
|
+
case /* Anchor */
|
|
1759
|
+
15: {
|
|
1760
|
+
if (this$.flowProps.length === 0) {
|
|
1761
|
+
this$.flowLead = YamlParser__TakePending(this$);
|
|
1762
|
+
} else {
|
|
1763
|
+
const previous = item(this$.flowProps.length - 1, this$.flowProps);
|
|
1764
|
+
Prop__set_NewLine_Z1FBCCD16(previous, this$.flowNewLine);
|
|
1765
|
+
Prop__set_Comment_22445A31(previous, this$.flowComment);
|
|
1766
|
+
Prop__set_Trivia_ZA6FC775(previous, YamlParser__TakePending(this$));
|
|
1767
|
+
}
|
|
1768
|
+
const prop = YamlParser__MakeProp_Z1030D618(this$, tok);
|
|
1769
|
+
void this$.flowProps.push(prop);
|
|
1770
|
+
YamlParser__FlowGap_1A8C0E50(this$, Prop__get_Span(prop).Finish);
|
|
1771
|
+
this$.flowNewLine = this$.gapNewLine;
|
|
1772
|
+
this$.flowComment = this$.gapComment;
|
|
1773
|
+
this$.gapComment = void 0;
|
|
1774
|
+
tok = YamlParser__FlowTake_1A8C0E50(this$, Prop__get_Span(prop).Finish);
|
|
1775
|
+
break;
|
|
1776
|
+
}
|
|
1777
|
+
case /* Scalar */
|
|
1778
|
+
18: {
|
|
1779
|
+
YamlParser__FlowLeaf_Z4A540553(this$, top, tok);
|
|
1780
|
+
reading = false;
|
|
1781
|
+
break;
|
|
1782
|
+
}
|
|
1783
|
+
case /* Alias */
|
|
1784
|
+
16: {
|
|
1785
|
+
YamlParser__FlowLeaf_Z4A540553(this$, top, tok);
|
|
1786
|
+
reading = false;
|
|
1787
|
+
break;
|
|
1788
|
+
}
|
|
1789
|
+
case /* FlowSequenceStart */
|
|
1790
|
+
10: {
|
|
1791
|
+
YamlParser__FlowOpen_Z4A540553(this$, top, tok);
|
|
1792
|
+
reading = false;
|
|
1793
|
+
break;
|
|
1794
|
+
}
|
|
1795
|
+
case /* FlowMappingStart */
|
|
1796
|
+
12: {
|
|
1797
|
+
YamlParser__FlowOpen_Z4A540553(this$, top, tok);
|
|
1798
|
+
reading = false;
|
|
1799
|
+
break;
|
|
1800
|
+
}
|
|
1801
|
+
case /* FlowEntry */
|
|
1802
|
+
14: {
|
|
1803
|
+
YamlParser__FlowEmpty_Z4A540553(this$, top, tok);
|
|
1804
|
+
reading = false;
|
|
1805
|
+
break;
|
|
1806
|
+
}
|
|
1807
|
+
case /* FlowSequenceEnd */
|
|
1808
|
+
11: {
|
|
1809
|
+
YamlParser__FlowEmpty_Z4A540553(this$, top, tok);
|
|
1810
|
+
reading = false;
|
|
1811
|
+
break;
|
|
1812
|
+
}
|
|
1813
|
+
case /* FlowMappingEnd */
|
|
1814
|
+
13: {
|
|
1815
|
+
YamlParser__FlowEmpty_Z4A540553(this$, top, tok);
|
|
1816
|
+
reading = false;
|
|
1817
|
+
break;
|
|
1818
|
+
}
|
|
1819
|
+
case /* Value */
|
|
1820
|
+
9: {
|
|
1821
|
+
YamlParser__FlowEmpty_Z4A540553(this$, top, tok);
|
|
1822
|
+
reading = false;
|
|
1823
|
+
break;
|
|
1824
|
+
}
|
|
1825
|
+
case /* StreamEnd */
|
|
1826
|
+
1: {
|
|
1827
|
+
YamlParser__FailUnclosed_40F14AEC(this$, top, tok.Span);
|
|
1828
|
+
reading = false;
|
|
1829
|
+
break;
|
|
1830
|
+
}
|
|
1831
|
+
default:
|
|
1832
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "This token cannot start a node of a flow collection.", tok.Span, singleton(Frame__get_Opener(top)));
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
function YamlParser__FinishFlowProps(_) {
|
|
1837
|
+
if (_.flowProps.length > 0) {
|
|
1838
|
+
const last = item(_.flowProps.length - 1, _.flowProps);
|
|
1839
|
+
Prop__set_NewLine_Z1FBCCD16(last, _.flowNewLine);
|
|
1840
|
+
Prop__set_Comment_22445A31(last, _.flowComment);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
function YamlParser__CheckFlowSeparation_Z1030D618(_, tok) {
|
|
1844
|
+
if (_.flowProps.length > 0 && equals(Prop__get_Span(item(_.flowProps.length - 1, _.flowProps)).Finish, tok.Span.Start)) {
|
|
1845
|
+
ParserSupport_failWith(YamlErrorCode.MissingSeparation, "A tag or an anchor needs a blank behind it.", tok.Span, singleton(Prop__get_Span(item(_.flowProps.length - 1, _.flowProps))));
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
function YamlParser__FlowLeaf_Z4A540553(this$, top, tok) {
|
|
1849
|
+
YamlParser__CheckFlowSeparation_Z1030D618(this$, tok);
|
|
1850
|
+
YamlParser__FinishFlowProps(this$);
|
|
1851
|
+
const count = this$.flowProps.length | 0;
|
|
1852
|
+
let nodeKind;
|
|
1853
|
+
const matchValue = tok.Lexeme;
|
|
1854
|
+
switch (matchValue.tag) {
|
|
1855
|
+
case /* Alias */
|
|
1856
|
+
16: {
|
|
1857
|
+
const name = matchValue.fields[0];
|
|
1858
|
+
if (count > 0) {
|
|
1859
|
+
ParserSupport_failWith(YamlErrorCode.AliasWithProperties, "An alias takes no tag and no anchor.", Prop__get_Span(item(0, this$.flowProps)), singleton(tok.Span));
|
|
1860
|
+
}
|
|
1861
|
+
YamlParser__CheckAlias_64571AD3(this$, tok, name);
|
|
1862
|
+
nodeKind = YamlNodeKind_Alias(name);
|
|
1863
|
+
break;
|
|
1864
|
+
}
|
|
1865
|
+
case /* Scalar */
|
|
1866
|
+
18: {
|
|
1867
|
+
nodeKind = YamlNodeKind_Scalar(matchValue.fields[0]);
|
|
1868
|
+
break;
|
|
1869
|
+
}
|
|
1870
|
+
default:
|
|
1871
|
+
nodeKind = ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A scalar or an alias was expected.", tok.Span, empty());
|
|
1872
|
+
}
|
|
1873
|
+
const nodeProps = YamlParser__BuildPropsOf_Z648DC8C4(this$, this$.flowProps, 0, count);
|
|
1874
|
+
const following = YamlParser__TakePending(this$);
|
|
1875
|
+
const layout = YamlParser__BuildLayoutOf_610EDFFD(this$, this$.flowProps, 0, count, following, true);
|
|
1876
|
+
YamlParser__SetFlowIndicator_Z30284FCB(this$, top, ParserSupport_separation(this$.flowIndicatorNewLine, this$.flowIndicatorComment, count > 0 ? this$.flowLead : following));
|
|
1877
|
+
YamlParser__FlowDeliver_5F745784(this$, top, new YamlNode(nodeKind, nodeProps, layout, void 0, ParserSupport_spanBetween(count > 0 ? Prop__get_Span(item(0, this$.flowProps)).Start : tok.Span.Start, tok.Span.Finish)));
|
|
1878
|
+
}
|
|
1879
|
+
function YamlParser__FlowOpen_Z4A540553(this$, top, opener) {
|
|
1880
|
+
YamlParser__CheckFlowSeparation_Z1030D618(this$, opener);
|
|
1881
|
+
YamlParser__FinishFlowProps(this$);
|
|
1882
|
+
const count = this$.flowProps.length | 0;
|
|
1883
|
+
const following = YamlParser__TakePending(this$);
|
|
1884
|
+
YamlParser__SetFlowIndicator_Z30284FCB(this$, top, ParserSupport_separation(this$.flowIndicatorNewLine, this$.flowIndicatorComment, count > 0 ? this$.flowLead : following));
|
|
1885
|
+
YamlParser__PushFlow_40F31829(this$, opener, following, false);
|
|
1886
|
+
}
|
|
1887
|
+
function YamlParser__FlowEmpty_Z4A540553(this$, top, delimiter) {
|
|
1888
|
+
const count = this$.flowProps.length | 0;
|
|
1889
|
+
if (count === 0) {
|
|
1890
|
+
YamlParser__SetFlowIndicator_Z30284FCB(this$, top, ParserSupport_separation(false, this$.flowIndicatorComment, empty()));
|
|
1891
|
+
YamlParser__FlowUnread_Z1030D618(this$, delimiter);
|
|
1892
|
+
YamlParser__FlowDeliver_5F745784(this$, top, ParserSupport_missingNode(Frame__get_LastEnd(top)));
|
|
1893
|
+
} else {
|
|
1894
|
+
const last = item(count - 1, this$.flowProps);
|
|
1895
|
+
Prop__set_NewLine_Z1FBCCD16(last, this$.flowNewLine);
|
|
1896
|
+
Prop__set_Comment_22445A31(last, this$.flowComment);
|
|
1897
|
+
const nodeProps = YamlParser__BuildPropsOf_Z648DC8C4(this$, this$.flowProps, 0, count);
|
|
1898
|
+
const layout = YamlParser__BuildLayoutOf_610EDFFD(this$, this$.flowProps, 0, count, empty(), false);
|
|
1899
|
+
YamlParser__SetFlowIndicator_Z30284FCB(this$, top, ParserSupport_separation(this$.flowIndicatorNewLine, this$.flowIndicatorComment, this$.flowLead));
|
|
1900
|
+
const first = Prop__get_Span(item(0, this$.flowProps)).Start;
|
|
1901
|
+
YamlParser__FlowUnread_Z1030D618(this$, delimiter);
|
|
1902
|
+
YamlParser__FlowDeliver_5F745784(this$, top, new YamlNode(YamlNodeKind_Scalar(new YamlScalar("", ScalarStyle.Plain, void 0, void 0)), nodeProps, layout, void 0, ParserSupport_spanBetween(first, Prop__get_Span(last).Finish)));
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
function YamlParser__FlowAfterKeyStep_21C4FEA5(this$, top) {
|
|
1906
|
+
let bind$0040 = void 0;
|
|
1907
|
+
const tok = YamlParser__FlowTake_1A8C0E50(this$, Frame__get_PendEnd(top));
|
|
1908
|
+
const comment = this$.gapComment;
|
|
1909
|
+
this$.gapComment = void 0;
|
|
1910
|
+
const matchValue = tok.Lexeme;
|
|
1911
|
+
switch (matchValue.tag) {
|
|
1912
|
+
case /* Value */
|
|
1913
|
+
9: {
|
|
1914
|
+
if (Frame__get_Question(top) == null) {
|
|
1915
|
+
YamlParser__CheckFlowKeyLines_Z637FBEC7(this$, Frame__get_Pend(top), Frame__get_PendEnd(top), tok);
|
|
1916
|
+
}
|
|
1917
|
+
Frame__set_BeforeColon_ZA6FC775(top, YamlParser__TakePending(this$));
|
|
1918
|
+
Frame__set_KeyNode_51084C1(top, (bind$0040 = Frame__get_Pend(top), new YamlNode(bind$0040.Kind, bind$0040.Properties, bind$0040.PropertyLayout, comment, bind$0040.Span)));
|
|
1919
|
+
Frame__set_LastEnd_1A8C0E50(top, tok.Span.Finish);
|
|
1920
|
+
YamlParser__FlowGap_1A8C0E50(this$, tok.Span.Finish);
|
|
1921
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowColon);
|
|
1922
|
+
break;
|
|
1923
|
+
}
|
|
1924
|
+
case /* FlowEntry */
|
|
1925
|
+
14: {
|
|
1926
|
+
YamlParser__AfterEntryComma_Z76C94CDB(this$, top, YamlParser__KeyOnlyEntry_78208974(this$, top, YamlParser__FlowAfterComma_78012589(this$, tok, Frame__get_PendEnd(top), comment)));
|
|
1927
|
+
break;
|
|
1928
|
+
}
|
|
1929
|
+
case /* FlowSequenceEnd */
|
|
1930
|
+
11: {
|
|
1931
|
+
if (YamlParser__CloserMatches_Z4A540553(this$, top, tok)) {
|
|
1932
|
+
YamlParser__AfterEntryCloser_5FC23E2D(this$, top, YamlParser__KeyOnlyEntry_78208974(this$, top, comment), tok);
|
|
1933
|
+
} else {
|
|
1934
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, tok);
|
|
1935
|
+
}
|
|
1936
|
+
break;
|
|
1937
|
+
}
|
|
1938
|
+
case /* FlowMappingEnd */
|
|
1939
|
+
13: {
|
|
1940
|
+
if (YamlParser__CloserMatches_Z4A540553(this$, top, tok)) {
|
|
1941
|
+
YamlParser__AfterEntryCloser_5FC23E2D(this$, top, YamlParser__KeyOnlyEntry_78208974(this$, top, comment), tok);
|
|
1942
|
+
} else {
|
|
1943
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, tok);
|
|
1944
|
+
}
|
|
1945
|
+
break;
|
|
1946
|
+
}
|
|
1947
|
+
case /* StreamEnd */
|
|
1948
|
+
1: {
|
|
1949
|
+
YamlParser__FailUnclosed_40F14AEC(this$, top, tok.Span);
|
|
1950
|
+
break;
|
|
1951
|
+
}
|
|
1952
|
+
default:
|
|
1953
|
+
ParserSupport_failWith(YamlErrorCode.MissingFlowComma, "Two entries of a flow collection need a `,` between them.", tok.Span, singleton(Frame__get_Opener(top)));
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
function YamlParser__KeyOnlyEntry_78208974(_, top, trailing) {
|
|
1957
|
+
let key = Frame__get_Pend(top);
|
|
1958
|
+
if (trailing == null) {
|
|
1959
|
+
} else {
|
|
1960
|
+
const text = trailing;
|
|
1961
|
+
if (YamlNodeModule_isMissingValue(key)) {
|
|
1962
|
+
Frame__set_Question_Z20DDFD6D(top, Separation_NewLine(new LineBreak(text, empty())));
|
|
1963
|
+
} else {
|
|
1964
|
+
key = new YamlNode(key.Kind, key.Properties, key.PropertyLayout, trailing, key.Span);
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
return new MappingEntry(Frame__get_Before(top), Frame__get_Question(top), key, empty(), void 0, ParserSupport_missingNode(ParserSupport_endOf(key)), ParserSupport_spanBetween(Frame__get_EntryStart(top), ParserSupport_endOf(key)));
|
|
1968
|
+
}
|
|
1969
|
+
function YamlParser__FlowAfterValueStep_21C4FEA5(this$, top) {
|
|
1970
|
+
const tok = YamlParser__FlowTake_1A8C0E50(this$, Frame__get_PendEnd(top));
|
|
1971
|
+
const comment = this$.gapComment;
|
|
1972
|
+
this$.gapComment = void 0;
|
|
1973
|
+
const matchValue = tok.Lexeme;
|
|
1974
|
+
switch (matchValue.tag) {
|
|
1975
|
+
case /* FlowEntry */
|
|
1976
|
+
14: {
|
|
1977
|
+
YamlParser__AfterEntryComma_Z76C94CDB(this$, top, YamlParser__ValueEntry_78208974(this$, top, YamlParser__FlowAfterComma_78012589(this$, tok, Frame__get_PendEnd(top), comment)));
|
|
1978
|
+
break;
|
|
1979
|
+
}
|
|
1980
|
+
case /* FlowSequenceEnd */
|
|
1981
|
+
11: {
|
|
1982
|
+
if (YamlParser__CloserMatches_Z4A540553(this$, top, tok)) {
|
|
1983
|
+
YamlParser__AfterEntryCloser_5FC23E2D(this$, top, YamlParser__ValueEntry_78208974(this$, top, comment), tok);
|
|
1984
|
+
} else {
|
|
1985
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, tok);
|
|
1986
|
+
}
|
|
1987
|
+
break;
|
|
1988
|
+
}
|
|
1989
|
+
case /* FlowMappingEnd */
|
|
1990
|
+
13: {
|
|
1991
|
+
if (YamlParser__CloserMatches_Z4A540553(this$, top, tok)) {
|
|
1992
|
+
YamlParser__AfterEntryCloser_5FC23E2D(this$, top, YamlParser__ValueEntry_78208974(this$, top, comment), tok);
|
|
1993
|
+
} else {
|
|
1994
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, tok);
|
|
1995
|
+
}
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1998
|
+
case /* StreamEnd */
|
|
1999
|
+
1: {
|
|
2000
|
+
YamlParser__FailUnclosed_40F14AEC(this$, top, tok.Span);
|
|
2001
|
+
break;
|
|
2002
|
+
}
|
|
2003
|
+
default:
|
|
2004
|
+
ParserSupport_failWith(YamlErrorCode.MissingFlowComma, "Two entries of a flow collection need a `,` between them.", tok.Span, singleton(Frame__get_Opener(top)));
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
function YamlParser__ValueEntry_78208974(_, top, trailing) {
|
|
2008
|
+
let value = Frame__get_Pend(top);
|
|
2009
|
+
if (trailing == null) {
|
|
2010
|
+
} else {
|
|
2011
|
+
const text = trailing;
|
|
2012
|
+
if (YamlNodeModule_isMissingValue(value)) {
|
|
2013
|
+
Frame__set_Colon_Z20DDFD6D(top, Separation_NewLine(new LineBreak(text, empty())));
|
|
2014
|
+
} else {
|
|
2015
|
+
value = new YamlNode(value.Kind, value.Properties, value.PropertyLayout, trailing, value.Span);
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
return new MappingEntry(Frame__get_Before(top), Frame__get_Question(top), Frame__get_KeyNode(top), Frame__get_BeforeColon(top), Frame__get_Colon(top), value, ParserSupport_spanBetween(Frame__get_EntryStart(top), ParserSupport_endOf(value)));
|
|
2019
|
+
}
|
|
2020
|
+
function YamlParser__AfterEntryComma_Z76C94CDB(this$, top, entry) {
|
|
2021
|
+
void Frame__get_Entries(top).push(entry);
|
|
2022
|
+
if (equals(Frame__get_Kind(top), FrameKind.FlowPair)) {
|
|
2023
|
+
YamlParser__ClosePair_21C4FEA5(this$, top);
|
|
2024
|
+
} else {
|
|
2025
|
+
Frame__set_Phase_1FF842B7(top, Phase.FlowEntry);
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
function YamlParser__AfterEntryCloser_5FC23E2D(this$, top, entry, closer) {
|
|
2029
|
+
void Frame__get_Entries(top).push(entry);
|
|
2030
|
+
if (equals(Frame__get_Kind(top), FrameKind.FlowPair)) {
|
|
2031
|
+
YamlParser__FlowUnread_Z1030D618(this$, closer);
|
|
2032
|
+
YamlParser__ClosePair_21C4FEA5(this$, top);
|
|
2033
|
+
} else {
|
|
2034
|
+
YamlParser__CloseFlow_Z4A540553(this$, top, closer);
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
function YamlParser__ClosePair_21C4FEA5(_, pair) {
|
|
2038
|
+
_.stack.splice(_.stack.length - 1, 1);
|
|
2039
|
+
_.flowCount = _.flowCount - 1 | 0;
|
|
2040
|
+
const entry = item(0, Frame__get_Entries(pair));
|
|
2041
|
+
const node = new YamlNode(YamlNodeKind_Mapping(new Collection$1(CollectionStyle.Flow, void 0, singleton(entry), empty())), ParserSupport_noProperties, empty(), void 0, entry.Span);
|
|
2042
|
+
const sequence = item(_.stack.length - 1, _.stack);
|
|
2043
|
+
void Frame__get_Items(sequence).push(new SequenceItem(Frame__get_Before(sequence), void 0, node, entry.Span));
|
|
2044
|
+
Frame__set_Phase_1FF842B7(sequence, Phase.FlowItem);
|
|
2045
|
+
}
|
|
2046
|
+
function YamlParser__CloseFlow_Z4A540553(this$, top, closer) {
|
|
2047
|
+
if (!YamlParser__CloserMatches_Z4A540553(this$, top, closer)) {
|
|
2048
|
+
YamlParser__FailMismatch_Z4A540553(this$, top, closer);
|
|
2049
|
+
}
|
|
2050
|
+
this$.stack.splice(this$.stack.length - 1, 1);
|
|
2051
|
+
this$.flowCount = this$.flowCount - 1 | 0;
|
|
2052
|
+
const ending = YamlParser__TakePending(this$);
|
|
2053
|
+
const node = new YamlNode(equals(Frame__get_Kind(top), FrameKind.FlowMapping) ? YamlNodeKind_Mapping(new Collection$1(CollectionStyle.Flow, Frame__get_OpeningComment(top), ofSeq(Frame__get_Entries(top)), ending)) : YamlNodeKind_Sequence(new Collection$1(CollectionStyle.Flow, Frame__get_OpeningComment(top), ofSeq(Frame__get_Items(top)), ending)), new NodeProperties(Frame__get_Tag(top), Frame__get_Anchor(top)), Frame__get_Layout(top), void 0, ParserSupport_spanBetween(Frame__get_Start(top), closer.Span.Finish));
|
|
2054
|
+
if (Frame__get_Outermost(top)) {
|
|
2055
|
+
YamlParser__FinishOutermost_Z5DCF9E14(this$, top, node, closer);
|
|
2056
|
+
} else {
|
|
2057
|
+
YamlParser__FlowDeliver_5F745784(this$, item(this$.stack.length - 1, this$.stack), node);
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
function YamlParser__FinishOutermost_Z5DCF9E14(this$, top, node, closer) {
|
|
2061
|
+
addRangeInPlace(Frame__get_Following(top), this$.pending);
|
|
2062
|
+
this$.flowKind = node.Kind;
|
|
2063
|
+
YamlParser__FinishLeaf_9F75402(this$, new Tok(closer.Lexeme, ParserSupport_spanBetween(Frame__get_Start(top), closer.Span.Finish), Frame__get_OpenerTab(top)), true);
|
|
2064
|
+
}
|
|
2065
|
+
function YamlParser__PlaceEndTrivia(_) {
|
|
2066
|
+
if (_.stack.length > 0) {
|
|
2067
|
+
const count = _.pending.length | 0;
|
|
2068
|
+
if (count > 0) {
|
|
2069
|
+
const columnOf = (trivia) => {
|
|
2070
|
+
if (trivia.tag === /* BlankLine */
|
|
2071
|
+
1) {
|
|
2072
|
+
return -1;
|
|
2073
|
+
} else {
|
|
2074
|
+
const matchValue = trivia.fields[0].Span;
|
|
2075
|
+
if (matchValue == null) {
|
|
2076
|
+
return 0;
|
|
2077
|
+
} else {
|
|
2078
|
+
return matchValue.Start.Column - 1 | 0;
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
};
|
|
2082
|
+
const targets = new Int32Array(count);
|
|
2083
|
+
let deepest = _.stack.length - 1;
|
|
2084
|
+
let lastCommentTarget = 0;
|
|
2085
|
+
for (let i = 0; i <= count - 1; i++) {
|
|
2086
|
+
let low = void 0, high = void 0, found = void 0;
|
|
2087
|
+
const column_1 = columnOf(item(i, _.pending)) | 0;
|
|
2088
|
+
if (column_1 >= 0) {
|
|
2089
|
+
deepest = min(deepest, (low = 0, high = _.stack.length - 1, found = 0, (() => {
|
|
2090
|
+
while (low <= high) {
|
|
2091
|
+
const middle = ~~((low + high) / 2) | 0;
|
|
2092
|
+
if (Frame__get_Col(item(middle, _.stack)) <= column_1) {
|
|
2093
|
+
found = middle | 0;
|
|
2094
|
+
low = middle + 1 | 0;
|
|
2095
|
+
} else {
|
|
2096
|
+
high = middle - 1 | 0;
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
})(), found)) | 0;
|
|
2100
|
+
setItem(targets, i, deepest | 0);
|
|
2101
|
+
lastCommentTarget = deepest | 0;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
let carry = lastCommentTarget;
|
|
2105
|
+
for (let i_1 = count - 1; i_1 >= 0; i_1--) {
|
|
2106
|
+
if (columnOf(item(i_1, _.pending)) >= 0) {
|
|
2107
|
+
carry = item(i_1, targets) | 0;
|
|
2108
|
+
} else {
|
|
2109
|
+
setItem(targets, i_1, carry | 0);
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
for (let i_2 = 0; i_2 <= count - 1; i_2++) {
|
|
2113
|
+
void Frame__get_End(item(item(i_2, targets), _.stack)).push(item(i_2, _.pending));
|
|
2114
|
+
}
|
|
2115
|
+
clear(_.pending);
|
|
2116
|
+
}
|
|
2117
|
+
} else if (_.docOpen && _.pending.length > 0) {
|
|
2118
|
+
if (YamlNodeModule_isMissingValue(_.docRoot)) {
|
|
2119
|
+
addRangeInPlace(_.pending, _.docBefore);
|
|
2120
|
+
} else {
|
|
2121
|
+
addRangeInPlace(_.pending, _.docAfter);
|
|
2122
|
+
}
|
|
2123
|
+
clear(_.pending);
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
function YamlParser__Terminate_Z1030D618(this$, tok) {
|
|
2127
|
+
const matchValue = tok.Lexeme;
|
|
2128
|
+
switch (matchValue.tag) {
|
|
2129
|
+
case /* StreamEnd */
|
|
2130
|
+
1: {
|
|
2131
|
+
if (this$.docOpen) {
|
|
2132
|
+
YamlParser__PlaceEndTrivia(this$);
|
|
2133
|
+
}
|
|
2134
|
+
break;
|
|
2135
|
+
}
|
|
2136
|
+
case /* DocumentEnd */
|
|
2137
|
+
3: {
|
|
2138
|
+
if (this$.docOpen) {
|
|
2139
|
+
YamlParser__PlaceEndTrivia(this$);
|
|
2140
|
+
}
|
|
2141
|
+
break;
|
|
2142
|
+
}
|
|
2143
|
+
default:
|
|
2144
|
+
}
|
|
2145
|
+
while (this$.stack.length > 0) {
|
|
2146
|
+
YamlParser__CloseTop(this$);
|
|
2147
|
+
}
|
|
2148
|
+
YamlParser__DocumentToken_Z1030D618(this$, tok);
|
|
2149
|
+
}
|
|
2150
|
+
function YamlParser__DocumentContent_Z1030D618(this$, tok) {
|
|
2151
|
+
if (this$.docOpen) {
|
|
2152
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "Text cannot follow the root node of a document.", tok.Span, ofArray(toArray(this$.docRoot.Span)));
|
|
2153
|
+
}
|
|
2154
|
+
if (this$.hasDirective) {
|
|
2155
|
+
ParserSupport_failWith(YamlErrorCode.DirectiveWithoutDocumentStart, "A directive needs a `---` behind it.", tok.Span, empty());
|
|
2156
|
+
}
|
|
2157
|
+
YamlParser__BeginDocument_Z1C5DA57A(this$, void 0, tok.Span.Start);
|
|
2158
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
2159
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.Root, -1, false, false, tok.Span.Start, true);
|
|
2160
|
+
}
|
|
2161
|
+
function YamlParser__BeginDocument_Z1C5DA57A(_, marker, start) {
|
|
2162
|
+
_.docOpen = true;
|
|
2163
|
+
_.docMarker = marker;
|
|
2164
|
+
_.docStart = start;
|
|
2165
|
+
_.docRoot = YamlNodeModule_empty;
|
|
2166
|
+
clear(_.docBefore);
|
|
2167
|
+
clear(_.docAfter);
|
|
2168
|
+
}
|
|
2169
|
+
function YamlParser__FinishDocument_Z7C53EDEA(_, endMarker) {
|
|
2170
|
+
let finish;
|
|
2171
|
+
if (endMarker == null) {
|
|
2172
|
+
finish = ParserSupport_endOf(_.docRoot);
|
|
2173
|
+
} else {
|
|
2174
|
+
const matchValue = endMarker.Span;
|
|
2175
|
+
finish = matchValue == null ? ParserSupport_endOf(_.docRoot) : matchValue.Finish;
|
|
2176
|
+
}
|
|
2177
|
+
void _.parts.push(StreamPart_Document$(new YamlDocument(ofSeq(_.docPrelude), _.docMarker, ofSeq(_.docBefore), _.docRoot, ofSeq(_.docAfter), endMarker, empty(), ParserSupport_spanBetween(_.docStart, finish))));
|
|
2178
|
+
clear(_.docPrelude);
|
|
2179
|
+
clear(_.docBefore);
|
|
2180
|
+
clear(_.docAfter);
|
|
2181
|
+
_.tagHandles.clear();
|
|
2182
|
+
_.anchors.clear();
|
|
2183
|
+
_.yamlDirective = void 0;
|
|
2184
|
+
_.hasDirective = false;
|
|
2185
|
+
_.docOpen = false;
|
|
2186
|
+
_.bomSeen = false;
|
|
2187
|
+
}
|
|
2188
|
+
function YamlParser__EndMarkerTail(this$) {
|
|
2189
|
+
const next = YamlParser__Next_49318336(this$, YamlParser__RootContext(this$));
|
|
2190
|
+
const matchValue = next.Lexeme;
|
|
2191
|
+
let matchResult = void 0, comment = void 0;
|
|
2192
|
+
switch (matchValue.tag) {
|
|
2193
|
+
case /* Scalar */
|
|
2194
|
+
18:
|
|
2195
|
+
case /* Alias */
|
|
2196
|
+
16:
|
|
2197
|
+
case /* Tag */
|
|
2198
|
+
17:
|
|
2199
|
+
case /* Anchor */
|
|
2200
|
+
15:
|
|
2201
|
+
case /* BlockEntry */
|
|
2202
|
+
7:
|
|
2203
|
+
case /* ExplicitKey */
|
|
2204
|
+
8:
|
|
2205
|
+
case /* Value */
|
|
2206
|
+
9: {
|
|
2207
|
+
matchResult = 1;
|
|
2208
|
+
break;
|
|
2209
|
+
}
|
|
2210
|
+
case /* Comment */
|
|
2211
|
+
19: {
|
|
2212
|
+
if (matchValue.fields[1]) {
|
|
2213
|
+
matchResult = 2;
|
|
2214
|
+
} else {
|
|
2215
|
+
matchResult = 0;
|
|
2216
|
+
comment = matchValue.fields[0];
|
|
2217
|
+
}
|
|
2218
|
+
break;
|
|
2219
|
+
}
|
|
2220
|
+
default:
|
|
2221
|
+
matchResult = 2;
|
|
2222
|
+
}
|
|
2223
|
+
switch (matchResult) {
|
|
2224
|
+
case 0:
|
|
2225
|
+
return comment;
|
|
2226
|
+
case 1:
|
|
2227
|
+
return ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "Only a comment can follow a `...` on its line.", next.Span, empty());
|
|
2228
|
+
default: {
|
|
2229
|
+
YamlParser__Unread_Z1030D618(this$, next);
|
|
2230
|
+
return void 0;
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
function YamlParser__FlushPendingBehindEnd(_) {
|
|
2235
|
+
if (_.pending.length > 0) {
|
|
2236
|
+
const matchValue = _.parts.length > 0 ? item(_.parts.length - 1, _.parts) : void 0;
|
|
2237
|
+
let matchResult = void 0, document$ = void 0;
|
|
2238
|
+
if (matchValue != null) {
|
|
2239
|
+
if (matchValue.tag === /* Document */
|
|
2240
|
+
0) {
|
|
2241
|
+
matchResult = 0;
|
|
2242
|
+
document$ = matchValue.fields[0];
|
|
2243
|
+
} else {
|
|
2244
|
+
matchResult = 1;
|
|
2245
|
+
}
|
|
2246
|
+
} else {
|
|
2247
|
+
matchResult = 1;
|
|
2248
|
+
}
|
|
2249
|
+
switch (matchResult) {
|
|
2250
|
+
case 0: {
|
|
2251
|
+
setItem(_.parts, _.parts.length - 1, StreamPart_Document$(new YamlDocument(document$.Prelude, document$.StartMarker, document$.BeforeRoot, document$.Root, document$.AfterRoot, document$.EndMarker, ofSeq(_.pending), document$.Span)));
|
|
2252
|
+
break;
|
|
2253
|
+
}
|
|
2254
|
+
case 1: {
|
|
2255
|
+
let enumerator = getEnumerator(_.pending);
|
|
2256
|
+
try {
|
|
2257
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
2258
|
+
const trivia = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
2259
|
+
void _.parts.push(StreamPart_Trivia(trivia));
|
|
2260
|
+
}
|
|
2261
|
+
} finally {
|
|
2262
|
+
disposeSafe(enumerator);
|
|
2263
|
+
}
|
|
2264
|
+
break;
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
clear(_.pending);
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
function YamlParser__FlushPendingToPrelude(this$) {
|
|
2271
|
+
let enumerator = getEnumerator(this$.pending);
|
|
2272
|
+
try {
|
|
2273
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
2274
|
+
const trivia = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
2275
|
+
void this$.docPrelude.push(PreludeItem_PreludeTrivia(trivia));
|
|
2276
|
+
}
|
|
2277
|
+
} finally {
|
|
2278
|
+
disposeSafe(enumerator);
|
|
2279
|
+
}
|
|
2280
|
+
clear(this$.pending);
|
|
2281
|
+
}
|
|
2282
|
+
function YamlParser__DocumentToken_Z1030D618(this$, tok) {
|
|
2283
|
+
const matchValue = tok.Lexeme;
|
|
2284
|
+
switch (matchValue.tag) {
|
|
2285
|
+
case /* Directive */
|
|
2286
|
+
5: {
|
|
2287
|
+
const directive = matchValue.fields[0];
|
|
2288
|
+
if (this$.docOpen && this$.bomSeen) {
|
|
2289
|
+
ParserSupport_failWith(YamlErrorCode.ContentAfterByteOrderMark, "A directive cannot follow a byte order mark that ended a document without a `...` in between.", tok.Span, singleton(this$.bomSpan));
|
|
2290
|
+
}
|
|
2291
|
+
if (this$.docOpen) {
|
|
2292
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A directive cannot stand inside a document.", tok.Span, empty());
|
|
2293
|
+
}
|
|
2294
|
+
switch (directive.tag) {
|
|
2295
|
+
case /* TagDirective */
|
|
2296
|
+
1: {
|
|
2297
|
+
const prefix = directive.fields[1];
|
|
2298
|
+
const handle = directive.fields[0];
|
|
2299
|
+
let matchValue_1;
|
|
2300
|
+
const cell = new FSharpRef(defaultOf());
|
|
2301
|
+
matchValue_1 = [tryGetValue(this$.tagHandles, handle, cell), cell.contents];
|
|
2302
|
+
if (matchValue_1[0]) {
|
|
2303
|
+
ParserSupport_failWith(YamlErrorCode.DuplicateTagDirective, toText(printf("The tag handle %s is declared twice."))(handle), tok.Span, singleton(matchValue_1[1][1]));
|
|
2304
|
+
} else {
|
|
2305
|
+
this$.tagHandles.set(handle, [prefix, tok.Span]);
|
|
2306
|
+
}
|
|
2307
|
+
break;
|
|
2308
|
+
}
|
|
2309
|
+
case /* ReservedDirective */
|
|
2310
|
+
2: {
|
|
2311
|
+
break;
|
|
2312
|
+
}
|
|
2313
|
+
default: {
|
|
2314
|
+
const major = directive.fields[0] | 0;
|
|
2315
|
+
if (this$.yamlDirective != null) {
|
|
2316
|
+
ParserSupport_failWith(YamlErrorCode.DuplicateYamlDirective, "A document has at most one %YAML directive.", tok.Span, ofArray(toArray(this$.yamlDirective)));
|
|
2317
|
+
}
|
|
2318
|
+
if (major !== 1) {
|
|
2319
|
+
ParserSupport_failWith(YamlErrorCode.UnsupportedYamlVersion, "Only YAML 1.x documents are supported.", tok.Span, empty());
|
|
2320
|
+
}
|
|
2321
|
+
this$.yamlDirective = tok.Span;
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
YamlParser__FlushPendingToPrelude(this$);
|
|
2325
|
+
const trailing = YamlParser__EolComment(this$);
|
|
2326
|
+
void this$.docPrelude.push(PreludeItem_Directive(new YamlDirective(directive, trailing, tok.Span)));
|
|
2327
|
+
if (!this$.hasDirective) {
|
|
2328
|
+
this$.directiveStart = tok.Span.Start;
|
|
2329
|
+
}
|
|
2330
|
+
this$.hasDirective = true;
|
|
2331
|
+
break;
|
|
2332
|
+
}
|
|
2333
|
+
case /* DocumentStart */
|
|
2334
|
+
2: {
|
|
2335
|
+
if (this$.docOpen) {
|
|
2336
|
+
YamlParser__FinishDocument_Z7C53EDEA(this$, void 0);
|
|
2337
|
+
}
|
|
2338
|
+
YamlParser__FlushPendingToPrelude(this$);
|
|
2339
|
+
YamlParser__BeginDocument_Z1C5DA57A(this$, new DocumentMarker(YamlParser__EolComment(this$), tok.Span), this$.hasDirective ? this$.directiveStart : tok.Span.Start);
|
|
2340
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.Root, -1, false, false, tok.Span.Finish, false);
|
|
2341
|
+
break;
|
|
2342
|
+
}
|
|
2343
|
+
case /* DocumentEnd */
|
|
2344
|
+
3: {
|
|
2345
|
+
const marker = new DocumentMarker(YamlParser__EndMarkerTail(this$), tok.Span);
|
|
2346
|
+
if (this$.docOpen) {
|
|
2347
|
+
YamlParser__FinishDocument_Z7C53EDEA(this$, marker);
|
|
2348
|
+
} else {
|
|
2349
|
+
if (this$.hasDirective) {
|
|
2350
|
+
ParserSupport_failWith(YamlErrorCode.DirectiveWithoutDocumentStart, "A directive needs a `---` behind it.", tok.Span, empty());
|
|
2351
|
+
}
|
|
2352
|
+
YamlParser__FlushPendingBehindEnd(this$);
|
|
2353
|
+
void this$.parts.push(StreamPart_ExtraEndMarker(marker));
|
|
2354
|
+
}
|
|
2355
|
+
break;
|
|
2356
|
+
}
|
|
2357
|
+
case /* StreamEnd */
|
|
2358
|
+
1: {
|
|
2359
|
+
if (this$.docOpen) {
|
|
2360
|
+
YamlParser__FinishDocument_Z7C53EDEA(this$, void 0);
|
|
2361
|
+
} else {
|
|
2362
|
+
if (this$.hasDirective) {
|
|
2363
|
+
ParserSupport_failWith(YamlErrorCode.DirectiveWithoutDocumentStart, "A directive needs a `---` behind it.", tok.Span, empty());
|
|
2364
|
+
}
|
|
2365
|
+
YamlParser__FlushPendingBehindEnd(this$);
|
|
2366
|
+
}
|
|
2367
|
+
this$.finished = true;
|
|
2368
|
+
break;
|
|
2369
|
+
}
|
|
2370
|
+
default:
|
|
2371
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "A document marker or the end of the text was expected.", tok.Span, empty());
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
function YamlParser__ByteOrderMarkStep_Z1030D618(this$, tok) {
|
|
2375
|
+
if (this$.hasDirective && !this$.docOpen) {
|
|
2376
|
+
ParserSupport_failWith(YamlErrorCode.InvalidCharacter, "A byte order mark cannot stand between a directive and the `---` behind it.", tok.Span, empty());
|
|
2377
|
+
}
|
|
2378
|
+
if (this$.docOpen && !this$.bomSeen) {
|
|
2379
|
+
this$.bomSeen = true;
|
|
2380
|
+
this$.bomSpan = tok.Span;
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
function YamlParser__AfterLineStart_Z524259A4(this$, indent) {
|
|
2384
|
+
const tok = YamlParser__Next_49318336(this$, YamlParser__LineContext(this$));
|
|
2385
|
+
const matchValue = tok.Lexeme;
|
|
2386
|
+
switch (matchValue.tag) {
|
|
2387
|
+
case /* DocumentStart */
|
|
2388
|
+
2: {
|
|
2389
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2390
|
+
break;
|
|
2391
|
+
}
|
|
2392
|
+
case /* DocumentEnd */
|
|
2393
|
+
3: {
|
|
2394
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2395
|
+
break;
|
|
2396
|
+
}
|
|
2397
|
+
case /* StreamEnd */
|
|
2398
|
+
1: {
|
|
2399
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2400
|
+
break;
|
|
2401
|
+
}
|
|
2402
|
+
case /* Directive */
|
|
2403
|
+
5: {
|
|
2404
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2405
|
+
break;
|
|
2406
|
+
}
|
|
2407
|
+
default: {
|
|
2408
|
+
if (this$.bomSeen) {
|
|
2409
|
+
ParserSupport_failWith(YamlErrorCode.ContentAfterByteOrderMark, "Only comments, blank lines, byte order marks, `---` and `...` can follow a byte order mark that ended a document.", tok.Span, singleton(this$.bomSpan));
|
|
2410
|
+
}
|
|
2411
|
+
let closed = defaultOf();
|
|
2412
|
+
while (this$.stack.length > 0 && Frame__get_Col(item(this$.stack.length - 1, this$.stack)) > indent) {
|
|
2413
|
+
closed = item(this$.stack.length - 1, this$.stack);
|
|
2414
|
+
YamlParser__CloseTop(this$);
|
|
2415
|
+
}
|
|
2416
|
+
if (this$.stack.length === 0) {
|
|
2417
|
+
YamlParser__DocumentContent_Z1030D618(this$, tok);
|
|
2418
|
+
} else {
|
|
2419
|
+
const top = item(this$.stack.length - 1, this$.stack);
|
|
2420
|
+
if (Frame__get_Col(top) < indent) {
|
|
2421
|
+
if (closed == null) {
|
|
2422
|
+
ParserSupport_failWith(YamlErrorCode.BadIndentation, "This line is indented deeper than the node in front of it allows.", tok.Span, singleton(ParserSupport_spanBetween(Frame__get_EntryStart(top), Frame__get_LastEnd(top))));
|
|
2423
|
+
} else {
|
|
2424
|
+
ParserSupport_failWith(YamlErrorCode.BadIndentation, "This line is indented less than the collection it ends and matches the indentation of no open collection.", tok.Span, singleton(ParserSupport_spanBetween(Frame__get_Start(closed), Frame__get_LastEnd(closed))));
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
YamlParser__Continue_Z1030D618(this$, tok);
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
function YamlParser__Continue_Z1030D618(this$, tok) {
|
|
2433
|
+
let again = true;
|
|
2434
|
+
while (again) {
|
|
2435
|
+
again = false;
|
|
2436
|
+
const top = item(this$.stack.length - 1, this$.stack);
|
|
2437
|
+
if (Frame__get_IsMap(top)) {
|
|
2438
|
+
const matchValue = tok.Lexeme;
|
|
2439
|
+
switch (matchValue.tag) {
|
|
2440
|
+
case /* BlockEntry */
|
|
2441
|
+
7: {
|
|
2442
|
+
ParserSupport_failWith(YamlErrorCode.MixedCollections, "A mapping takes entries that start with a key, and a dash starts a sequence entry.", tok.Span, singleton(Frame__get_FirstSpan(top)));
|
|
2443
|
+
break;
|
|
2444
|
+
}
|
|
2445
|
+
case /* Value */
|
|
2446
|
+
9: {
|
|
2447
|
+
if (Frame__get_AwaitsColon(top)) {
|
|
2448
|
+
Frame__set_BeforeColon_ZA6FC775(top, YamlParser__TakePending(this$));
|
|
2449
|
+
Frame__set_Phase_1FF842B7(top, Phase.AfterColon);
|
|
2450
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.ExplicitValue, Frame__get_Col(top), true, true, tok.Span.Finish, false);
|
|
2451
|
+
} else {
|
|
2452
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.Continue, Frame__get_Col(top), false, false, tok.Span.Start, true);
|
|
2453
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
2454
|
+
}
|
|
2455
|
+
break;
|
|
2456
|
+
}
|
|
2457
|
+
default: {
|
|
2458
|
+
if (Frame__get_AwaitsColon(top)) {
|
|
2459
|
+
YamlParser__FinishWithoutValue_21C4FEA5(this$, top);
|
|
2460
|
+
}
|
|
2461
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.Continue, Frame__get_Col(top), false, false, tok.Span.Start, true);
|
|
2462
|
+
YamlParser__Unread_Z1030D618(this$, tok);
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
} else if (tok.Lexeme.tag === /* BlockEntry */
|
|
2466
|
+
7) {
|
|
2467
|
+
YamlParser__StartRequest_Z56F48C19(this$, RequestKind.Continue, Frame__get_Col(top), false, false, tok.Span.Start, true);
|
|
2468
|
+
YamlParser__StartSequence_Z1030D618(this$, tok);
|
|
2469
|
+
} else if (Frame__get_Indentless(top)) {
|
|
2470
|
+
YamlParser__CloseTop(this$);
|
|
2471
|
+
again = true;
|
|
2472
|
+
} else {
|
|
2473
|
+
ParserSupport_failWith(YamlErrorCode.MixedCollections, "A sequence takes entries that start with a dash only.", tok.Span, singleton(Frame__get_FirstSpan(top)));
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
function YamlParser__LineStep(this$) {
|
|
2478
|
+
const tok = YamlParser__Next_49318336(this$, YamlParser__LineContext(this$));
|
|
2479
|
+
const matchValue = tok.Lexeme;
|
|
2480
|
+
let matchResult = void 0, comment = void 0, indent = void 0;
|
|
2481
|
+
switch (matchValue.tag) {
|
|
2482
|
+
case /* StreamStart */
|
|
2483
|
+
0: {
|
|
2484
|
+
matchResult = 0;
|
|
2485
|
+
break;
|
|
2486
|
+
}
|
|
2487
|
+
case /* Comment */
|
|
2488
|
+
19: {
|
|
2489
|
+
if (matchValue.fields[1]) {
|
|
2490
|
+
matchResult = 1;
|
|
2491
|
+
comment = matchValue.fields[0];
|
|
2492
|
+
} else {
|
|
2493
|
+
matchResult = 9;
|
|
2494
|
+
}
|
|
2495
|
+
break;
|
|
2496
|
+
}
|
|
2497
|
+
case /* BlankLine */
|
|
2498
|
+
20: {
|
|
2499
|
+
matchResult = 2;
|
|
2500
|
+
break;
|
|
2501
|
+
}
|
|
2502
|
+
case /* LineStart */
|
|
2503
|
+
6: {
|
|
2504
|
+
matchResult = 3;
|
|
2505
|
+
indent = matchValue.fields[0];
|
|
2506
|
+
break;
|
|
2507
|
+
}
|
|
2508
|
+
case /* ByteOrderMark */
|
|
2509
|
+
4: {
|
|
2510
|
+
matchResult = 4;
|
|
2511
|
+
break;
|
|
2512
|
+
}
|
|
2513
|
+
case /* DocumentStart */
|
|
2514
|
+
2: {
|
|
2515
|
+
matchResult = 5;
|
|
2516
|
+
break;
|
|
2517
|
+
}
|
|
2518
|
+
case /* DocumentEnd */
|
|
2519
|
+
3: {
|
|
2520
|
+
matchResult = 6;
|
|
2521
|
+
break;
|
|
2522
|
+
}
|
|
2523
|
+
case /* StreamEnd */
|
|
2524
|
+
1: {
|
|
2525
|
+
matchResult = 7;
|
|
2526
|
+
break;
|
|
2527
|
+
}
|
|
2528
|
+
case /* Directive */
|
|
2529
|
+
5: {
|
|
2530
|
+
matchResult = 8;
|
|
2531
|
+
break;
|
|
2532
|
+
}
|
|
2533
|
+
default:
|
|
2534
|
+
matchResult = 9;
|
|
2535
|
+
}
|
|
2536
|
+
switch (matchResult) {
|
|
2537
|
+
case 0: {
|
|
2538
|
+
break;
|
|
2539
|
+
}
|
|
2540
|
+
case 1: {
|
|
2541
|
+
void this$.pending.push(Trivia_FullLineComment(comment));
|
|
2542
|
+
break;
|
|
2543
|
+
}
|
|
2544
|
+
case 2: {
|
|
2545
|
+
void this$.pending.push(Trivia_BlankLine(tok.Span));
|
|
2546
|
+
break;
|
|
2547
|
+
}
|
|
2548
|
+
case 3: {
|
|
2549
|
+
YamlParser__AfterLineStart_Z524259A4(this$, indent);
|
|
2550
|
+
break;
|
|
2551
|
+
}
|
|
2552
|
+
case 4: {
|
|
2553
|
+
YamlParser__ByteOrderMarkStep_Z1030D618(this$, tok);
|
|
2554
|
+
break;
|
|
2555
|
+
}
|
|
2556
|
+
case 5: {
|
|
2557
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2558
|
+
break;
|
|
2559
|
+
}
|
|
2560
|
+
case 6: {
|
|
2561
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2562
|
+
break;
|
|
2563
|
+
}
|
|
2564
|
+
case 7: {
|
|
2565
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2566
|
+
break;
|
|
2567
|
+
}
|
|
2568
|
+
case 8: {
|
|
2569
|
+
YamlParser__Terminate_Z1030D618(this$, tok);
|
|
2570
|
+
break;
|
|
2571
|
+
}
|
|
2572
|
+
case 9: {
|
|
2573
|
+
ParserSupport_failWith(YamlErrorCode.UnexpectedContent, "This text cannot follow the node in front of it.", tok.Span, empty());
|
|
2574
|
+
break;
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
function YamlParser__Run(this$) {
|
|
2579
|
+
while (!this$.finished) {
|
|
2580
|
+
if (this$.flowCount > 0) {
|
|
2581
|
+
YamlParser__FlowStep(this$);
|
|
2582
|
+
} else if (this$.requested) {
|
|
2583
|
+
YamlParser__NodeStep(this$);
|
|
2584
|
+
} else {
|
|
2585
|
+
YamlParser__LineStep(this$);
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
return new YamlStream(ofSeq(this$.parts));
|
|
2589
|
+
}
|
|
2590
|
+
function YamlParser__isRoot(this$) {
|
|
2591
|
+
if (this$.kind.tag === /* Root */
|
|
2592
|
+
0) {
|
|
2593
|
+
return true;
|
|
2594
|
+
} else {
|
|
2595
|
+
return false;
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
function YamlParser__isContinue(this$) {
|
|
2599
|
+
if (this$.kind.tag === /* Continue */
|
|
2600
|
+
5) {
|
|
2601
|
+
return true;
|
|
2602
|
+
} else {
|
|
2603
|
+
return false;
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
function Parser_parseCursor(cursor) {
|
|
2607
|
+
try {
|
|
2608
|
+
return FSharpResult$2_Ok(YamlParser__Run(YamlParser_$ctor_4FA7F272(cursor)));
|
|
2609
|
+
} catch (matchValue) {
|
|
2610
|
+
if (matchValue instanceof ParseFailure) {
|
|
2611
|
+
const error = matchValue.Data0;
|
|
2612
|
+
return FSharpResult$2_Error$(new YamlError(error.Code, toText(printf("Line %d: %s"))(error.Span.Start.Line)(error.Message), error.Span, error.Related));
|
|
2613
|
+
} else {
|
|
2614
|
+
throw matchValue;
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
function Parser_parseStream(text) {
|
|
2619
|
+
return Parser_parseCursor(Cursor_$ctor_Z721C83C5(text));
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
export { Frame, FrameKind, FrameKind_$reflection, FrameKind_Block, FrameKind_FlowMapping, FrameKind_FlowPair, FrameKind_FlowSequence, Frame_$ctor_Z2E8F49A, Frame_$reflection, Frame__get_Anchor, Frame__get_AwaitsColon, Frame__get_Before, Frame__get_BeforeColon, Frame__get_Col, Frame__get_Colon, Frame__get_Dash, Frame__get_End, Frame__get_Entries, Frame__get_EntryStart, Frame__get_FirstKeySpan, Frame__get_FirstSpan, Frame__get_Following, Frame__get_Indentless, Frame__get_IsMap, Frame__get_Items, Frame__get_KeyNode, Frame__get_Kind, Frame__get_LastEnd, Frame__get_Layout, Frame__get_Opener, Frame__get_OpenerTab, Frame__get_OpeningComment, Frame__get_Outermost, Frame__get_Pend, Frame__get_PendEnd, Frame__get_Phase, Frame__get_Question, Frame__get_Start, Frame__get_Tag, Frame__set_Anchor_6DFDD678, Frame__set_BeforeColon_ZA6FC775, Frame__set_Before_ZA6FC775, Frame__set_Colon_Z20DDFD6D, Frame__set_Dash_Z20DDFD6D, Frame__set_EntryStart_1A8C0E50, Frame__set_Following_ZA6FC775, Frame__set_Indentless_Z1FBCCD16, Frame__set_KeyNode_51084C1, Frame__set_Kind_639F076D, Frame__set_LastEnd_1A8C0E50, Frame__set_Layout_Z300AE9EC, Frame__set_OpenerTab_Z1FBCCD16, Frame__set_Opener_1A9599A9, Frame__set_OpeningComment_22445A31, Frame__set_Outermost_Z1FBCCD16, Frame__set_PendEnd_1A8C0E50, Frame__set_Pend_51084C1, Frame__set_Phase_1FF842B7, Frame__set_Question_Z20DDFD6D, Frame__set_Tag_FE0ADB0, ParseFailure, ParseFailure_$reflection, ParserSupport_endOf, ParserSupport_failWith, ParserSupport_isBlockScalar, ParserSupport_missingNode, ParserSupport_noProperties, ParserSupport_separation, ParserSupport_spanAt, ParserSupport_spanBetween, ParserSupport_zeroMark, Parser_parseCursor, Parser_parseStream, Phase, Phase_$reflection, Phase_AfterColon, Phase_AfterDash, Phase_AfterQuestion, Phase_AwaitingColon, Phase_AwaitingEntry, Phase_FlowAfterItem, Phase_FlowAfterKey, Phase_FlowAfterValue, Phase_FlowColon, Phase_FlowEntry, Phase_FlowItem, Phase_FlowQuestion, Prop, Prop_$ctor_Z21B18FED, Prop_$reflection, Prop__get_Anchor, Prop__get_Comment, Prop__get_Name, Prop__get_NewLine, Prop__get_Span, Prop__get_Tab, Prop__get_Tag, Prop__get_Trivia, Prop__set_Comment_22445A31, Prop__set_NewLine_Z1FBCCD16, Prop__set_Trivia_ZA6FC775, RequestKind, RequestKind_$reflection, RequestKind_Continue, RequestKind_ExplicitKey, RequestKind_ExplicitValue, RequestKind_Item, RequestKind_Root, RequestKind_Value, Tok, Tok_$reflection, YamlParser, YamlParser_$ctor_4FA7F272, YamlParser_$reflection, YamlParser__Run, YamlParser__isContinue, YamlParser__isRoot };
|