update documentation
This commit is contained in:
parent
6bc1e9bbe5
commit
8f1a22d173
3 changed files with 41 additions and 43 deletions
|
|
@ -1,6 +1,3 @@
|
|||
> version 1.0.0
|
||||
|
||||
date: 2023-03-31T15:57:18+0200 (generated by `./make doc`)
|
||||
|
||||
##
|
||||
# example URI: `://domain.com/some3d.asset#pos=1,0,0&prio=-5`
|
||||
|
|
@ -24,7 +21,7 @@ date: 2023-03-31T15:57:18+0200 (generated by `./make doc`)
|
|||
|
||||
|
||||
# XR Fragments parser
|
||||
|
||||
note: community parsers will prolly outperform this initial parser :)
|
||||
> icanhazcode? yes, see [Parser.hx](./../src/xrfragment/Parser.hx)
|
||||
|
||||
the gist of it:
|
||||
|
|
|
|||
19
make
19
make
|
|
@ -32,8 +32,14 @@ tests(){
|
|||
}
|
||||
|
||||
doc(){
|
||||
generate(){
|
||||
cat $1 | awk '/\/\/ / {
|
||||
{
|
||||
echo "> version $VERSION"
|
||||
echo "\ndate: $(date +"%Y-%m-%dT%H:%M:%S%z") (generated by \`./make doc\`)"
|
||||
cat src/xrfragment/URI.hx
|
||||
cat src/xrfragment/Parser.hx
|
||||
} | awk '
|
||||
|
||||
/\/\/ / {
|
||||
gsub(".*// ","",$0);
|
||||
gsub("# ","\n# ",$0);
|
||||
if( match($0,/^#code /) ){ print "```\n"; system("cat "$2); print "```\n"; next; }
|
||||
|
|
@ -45,14 +51,9 @@ doc(){
|
|||
gsub(/#include \w/, text)
|
||||
}
|
||||
print $0;
|
||||
}'
|
||||
}
|
||||
{
|
||||
echo "> version $VERSION"
|
||||
echo "\ndate: $(date +"%Y-%m-%dT%H:%M:%S%z") (generated by \`./make doc\`)"
|
||||
generate src/xrfragment/URI.hx
|
||||
generate src/xrfragment/Parser.hx
|
||||
} > doc/RFC.md
|
||||
|
||||
' > doc/RFC.md
|
||||
}
|
||||
|
||||
test -z $1 && { try rm dist/* ; haxe build.hxml; exit $?; }
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class Parser { // #
|
|||
Frag.set("pos", Type.isVector); // | pos | 3D vector | HREF navigation/portals | |
|
||||
//
|
||||
// # XR Fragments parser
|
||||
if( Frag.exists(key) ){ //
|
||||
if( Frag.exists(key) ){ // note: community parsers will prolly outperform this initial parser :)
|
||||
if( Frag.get(key).match(value) ){ // > icanhazcode? yes, see [Parser.hx](./../src/xrfragment/Parser.hx)
|
||||
var v:Value = new Value(); //
|
||||
guessType(v, value); // the gist of it:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue