doc-gen tryout using awk

This commit is contained in:
Leon van Kammen 2023-03-30 15:44:13 +02:00
parent 76c9a6eadb
commit 0608483492
2 changed files with 26 additions and 10 deletions

12
doc/url.md Normal file
View file

@ -0,0 +1,12 @@
# URI Value types
| type | info | format | example |
|------|------|-------------------------------------------|
|vector| x,y,z| comma-separated | #pos=1,2,3 |
|string| color| FFFFFF (hex) | #fog=5m,FFAACC |
|string| | | #q=-sun |
|int | | [-]x[xxxxx] | #price:>=100 |
|float | | [-]x[.xxxx] (ieee)| #prio=-20
|array | mixed| \|-separated | #pos=0,0,0|90,0,0 |
> in general type-limitations will piggyback JSON limitations (IEEE floatsize e.g.)

View file

@ -3,16 +3,20 @@ package xrfragment;
@:expose // <- makes the class reachable from plain JavaScript
@:keep // <- avoids accidental removal by dead code elimination
class Value {
public var x:Float;
public var y:Float;
public var z:Float;
public var color:String;
public var string:String;
public var int:Int;
public var float:Float;
public var args:Array<Value>;
public function new(){}
// # URI Value types
//
// | type | info | format | example |
class Value { // |------|------|-------------------------------------------|
public var x:Float; // |vector| x,y,z| comma-separated | #pos=1,2,3 |
public var y:Float; //
public var z:Float; //
public var color:String; // |string| color| FFFFFF (hex) | #fog=5m,FFAACC |
public var string:String; // |string| | | #q=-sun |
public var int:Int; // |int | | [-]x[xxxxx] | #price:>=100 |
public var float:Float; // |float | | [-]x[.xxxx] (ieee)| #prio=-20
public var args:Array<Value>; // |array | mixed| \|-separated | #pos=0,0,0|90,0,0 |
public function new(){} //
// > in general type-limitations will piggyback JSON limitations (IEEE floatsize e.g.)
}
class Url {