lounge_lizard 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +33 -0
- data/LICENSE.txt +21 -0
- data/README.md +50 -0
- data/Rakefile +43 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/circle.yml +14 -0
- data/ext/drafter/CHANGELOG.md +278 -0
- data/ext/drafter/Dockerfile +17 -0
- data/ext/drafter/Makefile +62 -0
- data/ext/drafter/appveyor.yml +17 -0
- data/ext/drafter/bin/drafter +0 -0
- data/ext/drafter/build/Makefile +387 -0
- data/ext/drafter/build/drafter.Makefile +6 -0
- data/ext/drafter/build/drafter.target.mk +159 -0
- data/ext/drafter/build/ext/snowcrash/libmarkdownparser.target.mk +141 -0
- data/ext/drafter/build/ext/snowcrash/libsnowcrash.target.mk +154 -0
- data/ext/drafter/build/ext/snowcrash/libsundown.target.mk +149 -0
- data/ext/drafter/build/ext/snowcrash/perf-libsnowcrash.target.mk +147 -0
- data/ext/drafter/build/ext/snowcrash/snowcrash.Makefile +6 -0
- data/ext/drafter/build/gyp-mac-tool +606 -0
- data/ext/drafter/build/libdrafter.target.mk +186 -0
- data/ext/drafter/build/libsos.target.mk +137 -0
- data/ext/drafter/build/out/Release/drafter +0 -0
- data/ext/drafter/build/out/Release/libdrafter.dylib +0 -0
- data/ext/drafter/build/out/Release/libmarkdownparser.a +0 -0
- data/ext/drafter/build/out/Release/libsnowcrash.a +0 -0
- data/ext/drafter/build/out/Release/libsos.a +0 -0
- data/ext/drafter/build/out/Release/libsundown.a +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/config.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/main.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/reporting.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/ConversionContext.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/NamedTypesRegistry.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractAPI.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractDataStructure.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractElementFactory.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractSourceMap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Render.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Serialize.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeAST.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeResult.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter_private.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ComparableVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Element.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ExpandVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/IsExpandableVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/JSONSchemaVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/PrintVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Query.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Registry.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/RenderJSONVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeCompactVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/TypeQueryVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/VisitorUtils.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Blueprint.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/BlueprintSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HTTP.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HeadersParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSON.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONOneOfParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONTypeSectionParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONValueMemberParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Section.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Signature.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/UriTemplateParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/posix/RegexMatch.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/snowcrash.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsos/ext/sos/src/sos.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
- data/ext/drafter/circle.yml +32 -0
- data/ext/drafter/config.gypi +10 -0
- data/ext/drafter/config.mk +5 -0
- data/ext/drafter/configure +224 -0
- data/ext/drafter/drafter.gyp +189 -0
- data/ext/drafter/drafter.xcworkspace/contents.xcworkspacedata +13 -0
- data/ext/drafter/ext/snowcrash/Makefile +58 -0
- data/ext/drafter/ext/snowcrash/appveyor.yml +7 -0
- data/ext/drafter/ext/snowcrash/common.gypi +165 -0
- data/ext/drafter/ext/snowcrash/configure +197 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/Makefile +90 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/CONTRIBUTING.md +10 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile +84 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile.win +33 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/smartypants.c +72 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/sundown.c +80 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini.h +37 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.c +108 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.c +84 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.c +647 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.h +77 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.c +389 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html_block_names.txt +25 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.c +297 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.h +51 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.c +225 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.h +96 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/html_blocks.h +206 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.c +2726 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.h +147 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.c +204 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.h +58 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.c +81 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.h +29 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/sundown.def +20 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/markdown/markdown.vcproj +188 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/msvc.sln +38 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/sundown/sundown.vcproj +206 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.cc +160 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.h +90 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.cc +152 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.h +103 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.cc +388 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.h +106 -0
- data/ext/drafter/ext/snowcrash/snowcrash.gyp +196 -0
- data/ext/drafter/ext/snowcrash/src/ActionParser.h +560 -0
- data/ext/drafter/ext/snowcrash/src/AssetParser.h +123 -0
- data/ext/drafter/ext/snowcrash/src/AttributesParser.h +123 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.cc +90 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.h +489 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintParser.h +845 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc +81 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.h +345 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintUtility.h +111 -0
- data/ext/drafter/ext/snowcrash/src/CodeBlockUtility.h +276 -0
- data/ext/drafter/ext/snowcrash/src/DataStructureGroupParser.h +157 -0
- data/ext/drafter/ext/snowcrash/src/HTTP.cc +49 -0
- data/ext/drafter/ext/snowcrash/src/HTTP.h +108 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.cc +117 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.h +377 -0
- data/ext/drafter/ext/snowcrash/src/MSON.cc +272 -0
- data/ext/drafter/ext/snowcrash/src/MSON.h +405 -0
- data/ext/drafter/ext/snowcrash/src/MSONMixinParser.h +103 -0
- data/ext/drafter/ext/snowcrash/src/MSONNamedTypeParser.h +135 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.cc +132 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.h +80 -0
- data/ext/drafter/ext/snowcrash/src/MSONParameterParser.h +166 -0
- data/ext/drafter/ext/snowcrash/src/MSONPropertyMemberParser.h +106 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.cc +141 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.h +181 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.cc +209 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.h +213 -0
- data/ext/drafter/ext/snowcrash/src/MSONUtility.h +506 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.cc +214 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.h +390 -0
- data/ext/drafter/ext/snowcrash/src/ModelTable.h +87 -0
- data/ext/drafter/ext/snowcrash/src/ParameterParser.h +516 -0
- data/ext/drafter/ext/snowcrash/src/ParametersParser.h +222 -0
- data/ext/drafter/ext/snowcrash/src/PayloadParser.h +733 -0
- data/ext/drafter/ext/snowcrash/src/Platform.h +33 -0
- data/ext/drafter/ext/snowcrash/src/RegexMatch.h +32 -0
- data/ext/drafter/ext/snowcrash/src/RelationParser.h +87 -0
- data/ext/drafter/ext/snowcrash/src/ResourceGroupParser.h +297 -0
- data/ext/drafter/ext/snowcrash/src/ResourceParser.h +536 -0
- data/ext/drafter/ext/snowcrash/src/Section.cc +48 -0
- data/ext/drafter/ext/snowcrash/src/Section.h +60 -0
- data/ext/drafter/ext/snowcrash/src/SectionParser.h +246 -0
- data/ext/drafter/ext/snowcrash/src/SectionParserData.h +109 -0
- data/ext/drafter/ext/snowcrash/src/SectionProcessor.h +299 -0
- data/ext/drafter/ext/snowcrash/src/Signature.cc +75 -0
- data/ext/drafter/ext/snowcrash/src/Signature.h +103 -0
- data/ext/drafter/ext/snowcrash/src/SignatureSectionProcessor.h +442 -0
- data/ext/drafter/ext/snowcrash/src/SourceAnnotation.h +166 -0
- data/ext/drafter/ext/snowcrash/src/StringUtility.h +323 -0
- data/ext/drafter/ext/snowcrash/src/UriTemplateParser.cc +195 -0
- data/ext/drafter/ext/snowcrash/src/UriTemplateParser.h +240 -0
- data/ext/drafter/ext/snowcrash/src/ValuesParser.h +111 -0
- data/ext/drafter/ext/snowcrash/src/posix/RegexMatch.cc +99 -0
- data/ext/drafter/ext/snowcrash/src/snowcrash.cc +90 -0
- data/ext/drafter/ext/snowcrash/src/snowcrash.h +44 -0
- data/ext/drafter/ext/snowcrash/src/win/RegexMatch.cc +78 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/AUTHORS +12 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/DEPS +23 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/OWNERS +1 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/PRESUBMIT.py +137 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/buildbot_run.py +136 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/OWNERS +6 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/cq_config.json +15 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/codereview.settings +10 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/data/win/large-pdb-shim.cc +12 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp +8 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp.bat +5 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp_main.py +16 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSSettings.py +1096 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.py +270 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.py +445 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.py +548 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.py +608 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/easy_xml.py +157 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/flock_tool.py +54 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/analyzer.py +741 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/android.py +1069 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/cmake.py +1248 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +99 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/eclipse.py +425 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypd.py +94 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.py +2218 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/msvs.py +3467 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.py +2427 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.py +1300 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.py +2899 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/mac_tool.py +605 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.py +1093 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ordered_dict.py +289 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.py +46 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/win_tool.py +314 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.py +1664 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.py +276 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.py +2927 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xml_fix.py +69 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylintrc +307 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples +81 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples.bat +5 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/setup.py +19 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/emacs/gyp.el +275 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/graphviz.py +100 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_gyp.py +155 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_sln.py +169 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_vcproj.py +329 -0
- data/ext/drafter/ext/snowcrash/vcbuild.bat +139 -0
- data/ext/drafter/ext/sos/Makefile +62 -0
- data/ext/drafter/ext/sos/src/sos.cc +235 -0
- data/ext/drafter/ext/sos/src/sos.h +188 -0
- data/ext/drafter/ext/sos/src/sosJSON.h +121 -0
- data/ext/drafter/ext/sos/src/sosYAML.h +105 -0
- data/ext/drafter/src/ConversionContext.cc +39 -0
- data/ext/drafter/src/ConversionContext.h +34 -0
- data/ext/drafter/src/NamedTypesRegistry.cc +405 -0
- data/ext/drafter/src/NamedTypesRegistry.h +28 -0
- data/ext/drafter/src/NodeInfo.h +143 -0
- data/ext/drafter/src/RefractAPI.cc +579 -0
- data/ext/drafter/src/RefractAPI.h +28 -0
- data/ext/drafter/src/RefractDataStructure.cc +1199 -0
- data/ext/drafter/src/RefractDataStructure.h +26 -0
- data/ext/drafter/src/RefractElementFactory.cc +107 -0
- data/ext/drafter/src/RefractElementFactory.h +67 -0
- data/ext/drafter/src/RefractSourceMap.cc +29 -0
- data/ext/drafter/src/RefractSourceMap.h +57 -0
- data/ext/drafter/src/Render.cc +157 -0
- data/ext/drafter/src/Render.h +40 -0
- data/ext/drafter/src/Serialize.cc +160 -0
- data/ext/drafter/src/Serialize.h +289 -0
- data/ext/drafter/src/SerializeAST.cc +507 -0
- data/ext/drafter/src/SerializeAST.h +29 -0
- data/ext/drafter/src/SerializeResult.cc +170 -0
- data/ext/drafter/src/SerializeResult.h +34 -0
- data/ext/drafter/src/SerializeSourcemap.cc +331 -0
- data/ext/drafter/src/SerializeSourcemap.h +21 -0
- data/ext/drafter/src/Version.h +40 -0
- data/ext/drafter/src/config.cc +91 -0
- data/ext/drafter/src/config.h +38 -0
- data/ext/drafter/src/drafter.cc +137 -0
- data/ext/drafter/src/drafter.h +102 -0
- data/ext/drafter/src/drafter_private.cc +85 -0
- data/ext/drafter/src/drafter_private.h +34 -0
- data/ext/drafter/src/main.cc +137 -0
- data/ext/drafter/src/refract/AppendDecorator.h +58 -0
- data/ext/drafter/src/refract/Build.h +67 -0
- data/ext/drafter/src/refract/ComparableVisitor.cc +43 -0
- data/ext/drafter/src/refract/ComparableVisitor.h +62 -0
- data/ext/drafter/src/refract/Element.cc +409 -0
- data/ext/drafter/src/refract/Element.h +656 -0
- data/ext/drafter/src/refract/ElementFwd.h +37 -0
- data/ext/drafter/src/refract/ElementInserter.h +59 -0
- data/ext/drafter/src/refract/Exception.h +31 -0
- data/ext/drafter/src/refract/ExpandVisitor.cc +359 -0
- data/ext/drafter/src/refract/ExpandVisitor.h +58 -0
- data/ext/drafter/src/refract/FilterVisitor.h +52 -0
- data/ext/drafter/src/refract/IsExpandableVisitor.cc +140 -0
- data/ext/drafter/src/refract/IsExpandableVisitor.h +31 -0
- data/ext/drafter/src/refract/Iterate.h +160 -0
- data/ext/drafter/src/refract/JSONSchemaVisitor.cc +675 -0
- data/ext/drafter/src/refract/JSONSchemaVisitor.h +73 -0
- data/ext/drafter/src/refract/PrintVisitor.cc +164 -0
- data/ext/drafter/src/refract/PrintVisitor.h +50 -0
- data/ext/drafter/src/refract/Query.cc +13 -0
- data/ext/drafter/src/refract/Query.h +38 -0
- data/ext/drafter/src/refract/Registry.cc +114 -0
- data/ext/drafter/src/refract/Registry.h +43 -0
- data/ext/drafter/src/refract/RenderJSONVisitor.cc +255 -0
- data/ext/drafter/src/refract/RenderJSONVisitor.h +51 -0
- data/ext/drafter/src/refract/SerializeCompactVisitor.cc +167 -0
- data/ext/drafter/src/refract/SerializeCompactVisitor.h +56 -0
- data/ext/drafter/src/refract/SerializeVisitor.cc +214 -0
- data/ext/drafter/src/refract/SerializeVisitor.h +55 -0
- data/ext/drafter/src/refract/TypeQueryVisitor.cc +46 -0
- data/ext/drafter/src/refract/TypeQueryVisitor.h +110 -0
- data/ext/drafter/src/refract/Visitor.h +126 -0
- data/ext/drafter/src/refract/VisitorUtils.cc +63 -0
- data/ext/drafter/src/refract/VisitorUtils.h +231 -0
- data/ext/drafter/src/reporting.cc +263 -0
- data/ext/drafter/src/reporting.h +39 -0
- data/ext/drafter/src/stream.h +148 -0
- data/ext/drafter/tools/homebrew/drafter.rb +18 -0
- data/ext/drafter/tools/make-tarball.sh +39 -0
- data/ext/drafter/tools/refract-filter.py +96 -0
- data/ext/drafter/tools/release.sh +17 -0
- data/ext/drafter/vcbuild.bat +203 -0
- data/lib/lounge_lizard/binding.rb +29 -0
- data/lib/lounge_lizard/version.rb +3 -0
- data/lib/lounge_lizard.rb +18 -0
- data/lounge_lizard.gemspec +37 -0
- metadata +547 -0
@@ -0,0 +1,123 @@
|
|
1
|
+
//
|
2
|
+
// AttributesParser.h
|
3
|
+
// snowcrash
|
4
|
+
//
|
5
|
+
// Created by Pavan Kumar Sunkara on 11/25/14.
|
6
|
+
// Copyright (c) 2014 Apiary Inc. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#ifndef SNOWCRASH_ATTRIBUTESPARSER_H
|
10
|
+
#define SNOWCRASH_ATTRIBUTESPARSER_H
|
11
|
+
|
12
|
+
#include "RegexMatch.h"
|
13
|
+
#include "MSONValueMemberParser.h"
|
14
|
+
|
15
|
+
using namespace scpl;
|
16
|
+
|
17
|
+
namespace snowcrash {
|
18
|
+
|
19
|
+
/** Attributes matching regex */
|
20
|
+
const char* const AttributesRegex = "^[[:blank:]]*[Aa]ttributes?[[:blank:]]*(\\(.*\\))?$";
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Attributes section processor
|
24
|
+
*/
|
25
|
+
template<>
|
26
|
+
struct SectionProcessor<Attributes> : public SignatureSectionProcessorBase<Attributes> {
|
27
|
+
|
28
|
+
static SignatureTraits signatureTraits() {
|
29
|
+
|
30
|
+
SignatureTraits signatureTraits(SignatureTraits::IdentifierTrait |
|
31
|
+
SignatureTraits::AttributesTrait);
|
32
|
+
|
33
|
+
return signatureTraits;
|
34
|
+
}
|
35
|
+
|
36
|
+
static MarkdownNodeIterator finalizeSignature(const MarkdownNodeIterator& node,
|
37
|
+
SectionParserData& pd,
|
38
|
+
const Signature& signature,
|
39
|
+
const ParseResultRef<Attributes>& out) {
|
40
|
+
|
41
|
+
if (!IEqual<std::string>()(signature.identifier, "Attribute") &&
|
42
|
+
!IEqual<std::string>()(signature.identifier, "Attributes")) {
|
43
|
+
|
44
|
+
return node;
|
45
|
+
}
|
46
|
+
|
47
|
+
mson::parseTypeDefinition(node, pd, signature.attributes, out.report, out.node.typeDefinition);
|
48
|
+
|
49
|
+
if (pd.exportSourceMap()) {
|
50
|
+
|
51
|
+
if (!out.node.typeDefinition.empty()) {
|
52
|
+
out.sourceMap.typeDefinition.sourceMap = node->sourceMap;
|
53
|
+
}
|
54
|
+
|
55
|
+
out.sourceMap.sourceMap = node->sourceMap;
|
56
|
+
}
|
57
|
+
|
58
|
+
// Default to `object` type specification
|
59
|
+
if (out.node.typeDefinition.baseType == mson::UndefinedBaseType) {
|
60
|
+
out.node.typeDefinition.baseType = mson::ImplicitObjectBaseType;
|
61
|
+
}
|
62
|
+
|
63
|
+
SectionProcessor<mson::ValueMember>::parseRemainingContent(node, pd, signature.remainingContent,
|
64
|
+
out.node.sections, out.sourceMap.sections);
|
65
|
+
|
66
|
+
return ++MarkdownNodeIterator(node);
|
67
|
+
}
|
68
|
+
|
69
|
+
static MarkdownNodeIterator processDescription(const MarkdownNodeIterator& node,
|
70
|
+
const MarkdownNodes& siblings,
|
71
|
+
SectionParserData& pd,
|
72
|
+
const ParseResultRef<Attributes>& out) {
|
73
|
+
|
74
|
+
return SectionProcessor<mson::ValueMember>::blockDescription(node, pd, out.node.sections, out.sourceMap.sections);
|
75
|
+
}
|
76
|
+
|
77
|
+
static MarkdownNodeIterator processNestedSection(const MarkdownNodeIterator& node,
|
78
|
+
const MarkdownNodes& siblings,
|
79
|
+
SectionParserData& pd,
|
80
|
+
const ParseResultRef<Attributes>& out) {
|
81
|
+
|
82
|
+
ParseResultRef<mson::TypeSections> typeSections(out.report, out.node.sections, out.sourceMap.sections);
|
83
|
+
|
84
|
+
return SectionProcessor<mson::ValueMember>
|
85
|
+
::processNestedMembers<MSONTypeSectionListParser>(node, siblings, pd, typeSections,
|
86
|
+
out.node.typeDefinition.baseType);
|
87
|
+
}
|
88
|
+
|
89
|
+
static bool isDescriptionNode(const MarkdownNodeIterator& node,
|
90
|
+
SectionType sectionType) {
|
91
|
+
|
92
|
+
return SectionProcessor<mson::ValueMember>::isDescriptionNode(node, sectionType);
|
93
|
+
}
|
94
|
+
|
95
|
+
static SectionType sectionType(const MarkdownNodeIterator& node) {
|
96
|
+
|
97
|
+
if (node->type == mdp::ListItemMarkdownNodeType &&
|
98
|
+
!node->children().empty()) {
|
99
|
+
|
100
|
+
mdp::ByteBuffer remaining, subject = node->children().front().text;
|
101
|
+
|
102
|
+
subject = GetFirstLine(subject, remaining);
|
103
|
+
TrimString(subject);
|
104
|
+
|
105
|
+
if (RegexMatch(subject, AttributesRegex)) {
|
106
|
+
return AttributesSectionType;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
return UndefinedSectionType;
|
111
|
+
}
|
112
|
+
|
113
|
+
static SectionType nestedSectionType(const MarkdownNodeIterator& node) {
|
114
|
+
|
115
|
+
return SectionProcessor<mson::ValueMember>::nestedSectionType(node);
|
116
|
+
}
|
117
|
+
};
|
118
|
+
|
119
|
+
/** Attributes Section Parser */
|
120
|
+
typedef SectionParser<Attributes, ListSectionAdapter> AttributesParser;
|
121
|
+
}
|
122
|
+
|
123
|
+
#endif
|
@@ -0,0 +1,90 @@
|
|
1
|
+
//
|
2
|
+
// Blueprint.cc
|
3
|
+
// snowcrash
|
4
|
+
//
|
5
|
+
// Created by Pavan Kumar Sunkara on 26/01/15.
|
6
|
+
// Copyright (c) 2015 Apiary Inc. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#include "Blueprint.h"
|
10
|
+
|
11
|
+
using namespace snowcrash;
|
12
|
+
|
13
|
+
DataStructure& DataStructure::operator=(const mson::NamedType &rhs)
|
14
|
+
{
|
15
|
+
this->name = rhs.name;
|
16
|
+
this->typeDefinition = rhs.typeDefinition;
|
17
|
+
this->sections = rhs.sections;
|
18
|
+
|
19
|
+
return *this;
|
20
|
+
}
|
21
|
+
|
22
|
+
Elements& Element::Content::elements()
|
23
|
+
{
|
24
|
+
if (!m_elements.get())
|
25
|
+
throw ELEMENTS_NOT_SET_ERR;
|
26
|
+
|
27
|
+
return *m_elements;
|
28
|
+
}
|
29
|
+
|
30
|
+
const Elements& Element::Content::elements() const
|
31
|
+
{
|
32
|
+
if (!m_elements.get())
|
33
|
+
throw ELEMENTS_NOT_SET_ERR;
|
34
|
+
|
35
|
+
return *m_elements;
|
36
|
+
}
|
37
|
+
|
38
|
+
Element::Content::Content()
|
39
|
+
{
|
40
|
+
m_elements.reset(::new Elements);
|
41
|
+
}
|
42
|
+
|
43
|
+
Element::Content::Content(const Element::Content& rhs)
|
44
|
+
{
|
45
|
+
this->copy = rhs.copy;
|
46
|
+
this->resource = rhs.resource;
|
47
|
+
this->dataStructure = rhs.dataStructure;
|
48
|
+
m_elements.reset(::new Elements(*rhs.m_elements.get()));
|
49
|
+
}
|
50
|
+
|
51
|
+
Element::Content& Element::Content::operator=(const Element::Content& rhs)
|
52
|
+
{
|
53
|
+
this->copy = rhs.copy;
|
54
|
+
this->resource = rhs.resource;
|
55
|
+
this->dataStructure = rhs.dataStructure;
|
56
|
+
m_elements.reset(::new Elements(*rhs.m_elements.get()));
|
57
|
+
|
58
|
+
return *this;
|
59
|
+
}
|
60
|
+
|
61
|
+
Element::Content::~Content()
|
62
|
+
{
|
63
|
+
}
|
64
|
+
|
65
|
+
Element::Element(const Element::Class& element_)
|
66
|
+
: element(element_)
|
67
|
+
{
|
68
|
+
}
|
69
|
+
|
70
|
+
Element::Element(const Element& rhs)
|
71
|
+
{
|
72
|
+
this->element = rhs.element;
|
73
|
+
this->attributes = rhs.attributes;
|
74
|
+
this->content = rhs.content;
|
75
|
+
this->category = rhs.category;
|
76
|
+
}
|
77
|
+
|
78
|
+
Element& Element::operator=(const Element& rhs)
|
79
|
+
{
|
80
|
+
this->element = rhs.element;
|
81
|
+
this->attributes = rhs.attributes;
|
82
|
+
this->content = rhs.content;
|
83
|
+
this->category = rhs.category;
|
84
|
+
|
85
|
+
return *this;
|
86
|
+
}
|
87
|
+
|
88
|
+
Element::~Element()
|
89
|
+
{
|
90
|
+
}
|
@@ -0,0 +1,489 @@
|
|
1
|
+
//
|
2
|
+
// Blueprint.h
|
3
|
+
// snowcrash
|
4
|
+
//
|
5
|
+
// Created by Zdenek Nemec on 4/3/13.
|
6
|
+
// Copyright (c) 2013 Apiary Inc. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#ifndef SNOWCRASH_BLUEPRINT_H
|
10
|
+
#define SNOWCRASH_BLUEPRINT_H
|
11
|
+
|
12
|
+
#include <vector>
|
13
|
+
#include <string>
|
14
|
+
#include <utility>
|
15
|
+
#include "Platform.h"
|
16
|
+
#include "MarkdownNode.h"
|
17
|
+
#include "MSON.h"
|
18
|
+
|
19
|
+
/**
|
20
|
+
* API Blueprint Abstract Syntax Tree
|
21
|
+
* -----------------------------------
|
22
|
+
*
|
23
|
+
* Data types in this documents define the API Blueprint AST.
|
24
|
+
*/
|
25
|
+
|
26
|
+
namespace snowcrash {
|
27
|
+
|
28
|
+
/** Name of a an API Blueprint entity. */
|
29
|
+
typedef std::string Name;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* \brief An API Blueprint entity Description.
|
33
|
+
*
|
34
|
+
* Depending on parser setting the description might be
|
35
|
+
* rendered HTML from Markdown or raw Markdown.
|
36
|
+
*/
|
37
|
+
typedef std::string Description;
|
38
|
+
|
39
|
+
/** URI */
|
40
|
+
typedef std::string URI;
|
41
|
+
|
42
|
+
/** URI template */
|
43
|
+
typedef std::string URITemplate;
|
44
|
+
|
45
|
+
/** HTTP Method */
|
46
|
+
typedef std::string HTTPMethod;
|
47
|
+
|
48
|
+
/** Parameter Type */
|
49
|
+
typedef std::string Type;
|
50
|
+
|
51
|
+
/** Parameter Value */
|
52
|
+
typedef std::string Value;
|
53
|
+
|
54
|
+
/** A generic key - value pair */
|
55
|
+
typedef std::pair<std::string, std::string> KeyValuePair;
|
56
|
+
|
57
|
+
/** An asset data */
|
58
|
+
typedef std::string Asset;
|
59
|
+
|
60
|
+
/**
|
61
|
+
* \brief Metadata key-value pair,
|
62
|
+
*
|
63
|
+
* E.g. "HOST: http://acme.com"
|
64
|
+
*/
|
65
|
+
typedef KeyValuePair Metadata;
|
66
|
+
|
67
|
+
/**
|
68
|
+
* \brief Header key-value pair.
|
69
|
+
*
|
70
|
+
* E.g. "Content-Type: application/json"
|
71
|
+
*/
|
72
|
+
typedef KeyValuePair Header;
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Default Container for collections.
|
76
|
+
*
|
77
|
+
* FIXME: Use C++11 template aliases when migrating to C++11.
|
78
|
+
*/
|
79
|
+
|
80
|
+
template<typename T>
|
81
|
+
struct Collection {
|
82
|
+
typedef std::vector<T> type;
|
83
|
+
typedef typename std::vector<T>::iterator iterator;
|
84
|
+
typedef typename std::vector<T>::const_iterator const_iterator;
|
85
|
+
};
|
86
|
+
|
87
|
+
/** Metadata Collection */
|
88
|
+
typedef Collection<Metadata>::type MetadataCollection;
|
89
|
+
|
90
|
+
/** Headers */
|
91
|
+
typedef Collection<Header>::type Headers;
|
92
|
+
|
93
|
+
/** Collection of Parameter Values */
|
94
|
+
typedef Collection<Value>::type Values;
|
95
|
+
|
96
|
+
/** Role of an element */
|
97
|
+
enum AssetRole {
|
98
|
+
UndefinedAssetRole = 0, // Unknown
|
99
|
+
BodyExampleAssetRole, // Body example for asset
|
100
|
+
BodySchemaAssetRole // Body schema for asset
|
101
|
+
};
|
102
|
+
|
103
|
+
/** Parameter Use flag */
|
104
|
+
enum ParameterUse {
|
105
|
+
UndefinedParameterUse,
|
106
|
+
OptionalParameterUse,
|
107
|
+
RequiredParameterUse
|
108
|
+
};
|
109
|
+
|
110
|
+
/** Parameter */
|
111
|
+
struct Parameter {
|
112
|
+
|
113
|
+
/** Parameter Name */
|
114
|
+
Name name;
|
115
|
+
|
116
|
+
/** Parameter Description */
|
117
|
+
Description description;
|
118
|
+
|
119
|
+
/** Type */
|
120
|
+
Type type;
|
121
|
+
|
122
|
+
/** Required flag */
|
123
|
+
ParameterUse use;
|
124
|
+
|
125
|
+
/** Default Value, applicable only when `required == false` */
|
126
|
+
Value defaultValue;
|
127
|
+
|
128
|
+
/** Example Value */
|
129
|
+
Value exampleValue;
|
130
|
+
|
131
|
+
/** Enumeration of possible values */
|
132
|
+
Values values;
|
133
|
+
};
|
134
|
+
|
135
|
+
/** Parameter with MSON-like syntax */
|
136
|
+
struct MSONParameter : public Parameter {
|
137
|
+
};
|
138
|
+
|
139
|
+
/** Collection of Parameters */
|
140
|
+
typedef Collection<Parameter>::type Parameters;
|
141
|
+
|
142
|
+
/** Identifier(name) of Reference */
|
143
|
+
typedef std::string Identifier;
|
144
|
+
|
145
|
+
/** Reference */
|
146
|
+
struct Reference {
|
147
|
+
|
148
|
+
/** Reference Resolution State */
|
149
|
+
enum State {
|
150
|
+
StateUnresolved, // Reference unresolved (undefined)
|
151
|
+
StatePending, // Reference resolution pending
|
152
|
+
StateResolved // Reference resolved successfully
|
153
|
+
};
|
154
|
+
|
155
|
+
/** Reference Type */
|
156
|
+
enum ReferenceType {
|
157
|
+
ModelReference // Resource Model as a reference
|
158
|
+
};
|
159
|
+
|
160
|
+
/** Identifier */
|
161
|
+
Identifier id;
|
162
|
+
|
163
|
+
/** Type */
|
164
|
+
ReferenceType type;
|
165
|
+
|
166
|
+
struct ReferenceMetadata {
|
167
|
+
|
168
|
+
/** Constructor */
|
169
|
+
ReferenceMetadata(State state_ = StateUnresolved)
|
170
|
+
: state(state_) {}
|
171
|
+
|
172
|
+
/** Markdown AST reference source node (for source map) */
|
173
|
+
mdp::MarkdownNodeIterator node;
|
174
|
+
|
175
|
+
/** Reference resolution state */
|
176
|
+
State state;
|
177
|
+
};
|
178
|
+
|
179
|
+
/** Metadata for the reference */
|
180
|
+
ReferenceMetadata meta;
|
181
|
+
};
|
182
|
+
|
183
|
+
/**
|
184
|
+
* Data Structure
|
185
|
+
*/
|
186
|
+
struct DataStructure : public mson::NamedType {
|
187
|
+
|
188
|
+
/** Assignment operator for Named Type */
|
189
|
+
DataStructure& operator=(const mson::NamedType& rhs);
|
190
|
+
};
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Attributes
|
194
|
+
*/
|
195
|
+
typedef DataStructure Attributes;
|
196
|
+
|
197
|
+
/**
|
198
|
+
* Payload
|
199
|
+
*/
|
200
|
+
struct Payload {
|
201
|
+
|
202
|
+
/** A Payload Name */
|
203
|
+
Name name;
|
204
|
+
|
205
|
+
/** Payload Description */
|
206
|
+
Description description;
|
207
|
+
|
208
|
+
/** Payload-specific Parameters */
|
209
|
+
Parameters parameters;
|
210
|
+
|
211
|
+
/** Payload-specific Headers */
|
212
|
+
Headers headers;
|
213
|
+
|
214
|
+
/** Payload-specific Attributes */
|
215
|
+
Attributes attributes;
|
216
|
+
|
217
|
+
/** Body */
|
218
|
+
Asset body;
|
219
|
+
|
220
|
+
/** Schema */
|
221
|
+
Asset schema;
|
222
|
+
|
223
|
+
/** Reference */
|
224
|
+
Reference reference;
|
225
|
+
};
|
226
|
+
|
227
|
+
/** Resource Model */
|
228
|
+
typedef Payload ResourceModel;
|
229
|
+
|
230
|
+
/** Request */
|
231
|
+
typedef Payload Request;
|
232
|
+
|
233
|
+
/**
|
234
|
+
* \brief Response
|
235
|
+
*
|
236
|
+
* A payload returned in a response to an action.
|
237
|
+
* Payload's name represents the HTTP status code.
|
238
|
+
*/
|
239
|
+
typedef Payload Response;
|
240
|
+
|
241
|
+
/** Collection of Requests */
|
242
|
+
typedef Collection<Request>::type Requests;
|
243
|
+
|
244
|
+
/** Collection of Responses */
|
245
|
+
typedef Collection<Response>::type Responses;
|
246
|
+
|
247
|
+
/**
|
248
|
+
* An HTTP transaction example.
|
249
|
+
*/
|
250
|
+
struct TransactionExample {
|
251
|
+
|
252
|
+
/** An example name */
|
253
|
+
Name name;
|
254
|
+
|
255
|
+
/** Description */
|
256
|
+
Description description;
|
257
|
+
|
258
|
+
/** Requests */
|
259
|
+
Requests requests;
|
260
|
+
|
261
|
+
/** Responses */
|
262
|
+
Responses responses;
|
263
|
+
};
|
264
|
+
|
265
|
+
/** Collection of Transaction examples */
|
266
|
+
typedef Collection<TransactionExample>::type TransactionExamples;
|
267
|
+
|
268
|
+
/**
|
269
|
+
* Link relation
|
270
|
+
*/
|
271
|
+
struct Relation {
|
272
|
+
|
273
|
+
/** String */
|
274
|
+
std::string str;
|
275
|
+
};
|
276
|
+
|
277
|
+
/**
|
278
|
+
* Action
|
279
|
+
*/
|
280
|
+
struct Action {
|
281
|
+
|
282
|
+
/** HTTP method */
|
283
|
+
HTTPMethod method;
|
284
|
+
|
285
|
+
/** An Action name */
|
286
|
+
Name name;
|
287
|
+
|
288
|
+
/** Description */
|
289
|
+
Description description;
|
290
|
+
|
291
|
+
/** Action-specific Parameters */
|
292
|
+
Parameters parameters;
|
293
|
+
|
294
|
+
/** Action-specific Attributes */
|
295
|
+
Attributes attributes;
|
296
|
+
|
297
|
+
/** URI Template */
|
298
|
+
URITemplate uriTemplate;
|
299
|
+
|
300
|
+
/** Link Relation */
|
301
|
+
Relation relation;
|
302
|
+
|
303
|
+
/**
|
304
|
+
* \brief Action-specific HTTP headers
|
305
|
+
*
|
306
|
+
* DEPRECATION WARNING:
|
307
|
+
* --------------------
|
308
|
+
*
|
309
|
+
* This AST node is build for deprecated API Blueprint syntax
|
310
|
+
* and as such it will be removed in a future version of
|
311
|
+
* Snow Crash.
|
312
|
+
*
|
313
|
+
* Use respective payload's header collection instead.
|
314
|
+
*/
|
315
|
+
DEPRECATED Headers headers;
|
316
|
+
|
317
|
+
/** Transactions examples */
|
318
|
+
TransactionExamples examples;
|
319
|
+
};
|
320
|
+
|
321
|
+
/** Collection of Actions */
|
322
|
+
typedef Collection<Action>::type Actions;
|
323
|
+
|
324
|
+
/**
|
325
|
+
* API Resource
|
326
|
+
*/
|
327
|
+
struct Resource {
|
328
|
+
|
329
|
+
/** URI template */
|
330
|
+
URITemplate uriTemplate;
|
331
|
+
|
332
|
+
/** A Resource Name */
|
333
|
+
Name name;
|
334
|
+
|
335
|
+
/** Description of the resource */
|
336
|
+
Description description;
|
337
|
+
|
338
|
+
/** Model representing this Resource */
|
339
|
+
ResourceModel model;
|
340
|
+
|
341
|
+
/** Resource-specific Attributes */
|
342
|
+
Attributes attributes;
|
343
|
+
|
344
|
+
/** Parameters */
|
345
|
+
Parameters parameters;
|
346
|
+
|
347
|
+
/**
|
348
|
+
* \brief Resource-specific HTTP Headers
|
349
|
+
*
|
350
|
+
* DEPRECATION WARNING:
|
351
|
+
* --------------------
|
352
|
+
*
|
353
|
+
* This AST node is build for deprecated API Blueprint syntax
|
354
|
+
* and as such it will be removed in a future version of
|
355
|
+
* Snow Crash.
|
356
|
+
*
|
357
|
+
* Use respective payload's header collection instead.
|
358
|
+
*/
|
359
|
+
DEPRECATED Headers headers;
|
360
|
+
|
361
|
+
/** A set of Actions specified for this Resource */
|
362
|
+
Actions actions;
|
363
|
+
};
|
364
|
+
|
365
|
+
/** Collection of Resources */
|
366
|
+
typedef Collection<Resource>::type Resources;
|
367
|
+
|
368
|
+
/** Forward declaration of Element */
|
369
|
+
struct Element;
|
370
|
+
|
371
|
+
/** Collection of elements */
|
372
|
+
typedef std::vector<Element> Elements;
|
373
|
+
|
374
|
+
/** Element */
|
375
|
+
struct Element {
|
376
|
+
|
377
|
+
/** Class of an element */
|
378
|
+
enum Class {
|
379
|
+
UndefinedElement = 0, // Unknown
|
380
|
+
CategoryElement, // Group of other elements
|
381
|
+
CopyElement, // Human readable text
|
382
|
+
AssetElement, // Asset of API description
|
383
|
+
ResourceElement, // Resource
|
384
|
+
DataStructureElement // Data Structure
|
385
|
+
};
|
386
|
+
|
387
|
+
/** Attributes of an element */
|
388
|
+
struct Attributes {
|
389
|
+
|
390
|
+
/** Human readable name of the element */
|
391
|
+
Name name;
|
392
|
+
};
|
393
|
+
|
394
|
+
/** Content of an element */
|
395
|
+
struct Content {
|
396
|
+
|
397
|
+
/** EITHER Copy */
|
398
|
+
std::string copy;
|
399
|
+
|
400
|
+
/** OR Resource */
|
401
|
+
Resource resource;
|
402
|
+
|
403
|
+
/** OR Data Structure */
|
404
|
+
DataStructure dataStructure;
|
405
|
+
|
406
|
+
/** OR Collection of elements */
|
407
|
+
Elements& elements();
|
408
|
+
const Elements& elements() const;
|
409
|
+
|
410
|
+
/** Constructor */
|
411
|
+
Content();
|
412
|
+
|
413
|
+
/** Copy constructor */
|
414
|
+
Content(const Element::Content& rhs);
|
415
|
+
|
416
|
+
/** Assignment operator */
|
417
|
+
Content& operator=(const Element::Content& rhs);
|
418
|
+
|
419
|
+
/** Destructor */
|
420
|
+
~Content();
|
421
|
+
|
422
|
+
private:
|
423
|
+
std::unique_ptr<Elements> m_elements;
|
424
|
+
};
|
425
|
+
|
426
|
+
/** Type of Category element (parser internal flag) */
|
427
|
+
enum Category {
|
428
|
+
UndefinedCategory = 0, // Unknown
|
429
|
+
ResourceGroupCategory, // Resource Group
|
430
|
+
DataStructureGroupCategory // Data Structure Group
|
431
|
+
};
|
432
|
+
|
433
|
+
/** Type of the element */
|
434
|
+
Element::Class element;
|
435
|
+
|
436
|
+
/** Attributes of the element */
|
437
|
+
Element::Attributes attributes;
|
438
|
+
|
439
|
+
/** Content of the element */
|
440
|
+
Element::Content content;
|
441
|
+
|
442
|
+
/** Type of Category element (to be used internally only) */
|
443
|
+
Element::Category category;
|
444
|
+
|
445
|
+
/** Constructor */
|
446
|
+
Element(const Element::Class& element_ = Element::UndefinedElement);
|
447
|
+
|
448
|
+
/** Copy constructor */
|
449
|
+
Element(const Element& rhs);
|
450
|
+
|
451
|
+
/** Assignment operator */
|
452
|
+
Element& operator=(const Element& rhs);
|
453
|
+
|
454
|
+
/** Destructor */
|
455
|
+
~Element();
|
456
|
+
};
|
457
|
+
|
458
|
+
/**
|
459
|
+
* Group of API Resources (Category Element)
|
460
|
+
*/
|
461
|
+
struct ResourceGroup : public Element {
|
462
|
+
};
|
463
|
+
|
464
|
+
/**
|
465
|
+
* Group of Data Structures (Category Element)
|
466
|
+
*/
|
467
|
+
struct DataStructureGroup : public Element {
|
468
|
+
};
|
469
|
+
|
470
|
+
/**
|
471
|
+
* \brief API Blueprint AST
|
472
|
+
*
|
473
|
+
* This is top-level (or root if you prefer) of API Blueprint abstract syntax tree.
|
474
|
+
* Start reading a parsed API here.
|
475
|
+
*/
|
476
|
+
struct Blueprint : public Element {
|
477
|
+
|
478
|
+
/** Metadata */
|
479
|
+
MetadataCollection metadata;
|
480
|
+
|
481
|
+
/** The API Name */
|
482
|
+
Name name;
|
483
|
+
|
484
|
+
/** An API Overview description */
|
485
|
+
Description description;
|
486
|
+
};
|
487
|
+
}
|
488
|
+
|
489
|
+
#endif
|