argparse is an explicit, strongly-typed command line argument parser.
argparse is an explicit, strongly-typed command line argument parser.
Proc Description
flag(...) boolean flag (e.g. --dryrun )
@@ -202,12 +157,12 @@ src/argparse
By default (unless nohelpflag is present) calling parse() with a help flag (-h / --help ) will raise a ShortCircuit error. The error's flag field will contain the name of the flag that triggered the short circuit. For help-related short circuits, the error's help field will contain the help text of the given subcommand.
Example:
-import src / argparse
-var res : string
+import argparse
+var res : string
var p = newParser :
help ( "A demonstration of this library in a program named {prog}" )
flag ( "-n" , "--dryrun" )
- option ( "--name" , default = some ( "bob" ) , help = "Name to use" )
+ option ( "--name" , default = some ( "bob" ) , help = "Name to use" )
command ( "ls" ) :
run :
res = "did ls " & opts . parentOpts . name
@@ -226,11 +181,16 @@ src/argparse
quit ( 1 )
assert res == "would have run: something bob"
Example:
-import src / argparse
+import argparse
var p = newParser :
help ( "A description of this program, named {prog}" )
flag ( "-n" , "--dryrun" )
- option ( "-o" , "--output" , help = "Write output to this file" , default = some ( "somewhere.txt" ) )
+ option (
+ "-o" ,
+ "--output" ,
+ help = "Write output to this file" ,
+ default = some ( "somewhere.txt" ) ,
+ )
option ( "-k" , "--kind" , choices = @ [ "fruit" , "vegetable" ] )
arg ( "input" )
@@ -247,7 +207,7 @@ src/argparse
stderr . writeLine getCurrentExceptionMsg ( )
quit ( 1 )
Example:
-import src / argparse
+import argparse
var p = newParser :
command "go" :
flag ( "-a" )
@@ -259,22 +219,26 @@ src/argparse
assert opts . go . isSome
assert opts . go . get . a == true
assert opts . leave . isNone
-
+
-
-
-
-
proc arg ( varname : string ; default = none ( ) ; env = "" ; help = "" ; nargs = 1 ) {.
- compileTime , ... raises : [ ] , tags : [ ] .}
-
-
-Add an argument to the argument parser.
+
+
+
+
+
proc arg ( varname : string ; default = none [ string ] ( ) ; env = "" ; help = "" ;
+ completionsGenerator = default ( array [ ShellCompletionKind , string ] ) ;
+ nargs = 1 ) {.compileTime , ... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Add an argument to the argument parser.
Set default to the default Option[string] value. This is only allowed for nargs = 1 .
Set env to an environment variable name to use as the default value. This is only allowed for nargs = 1 .
+Set completionsGenerator , with string at index given by shell kind. The string is executable in the target shell and will return a list of completions for the option.
The value nargs has the following meanings:
var p = newParser :
+const generator = [ ShellCompletionKind . sckFish : "__fish_complete_path" ]
+var p = newParser :
arg ( "name" , help = "Name of apple" )
arg ( "twowords" , nargs = 2 )
- arg ( "more" , nargs = - 1 )
+ arg ( "more" , completionsGenerator = generator , nargs = - 1 )
let res = p . parse ( @ [ "cameo" , "hot" , "dog" , "things" ] )
assert res . name == "cameo"
assert res . twowords == @ [ "hot" , "dog" ]
assert res . more == @ [ "things" ]
-
-
+
+
-
-
proc flag ( name1 : string ; name2 = "" ; multiple = false ; help = "" ;
- hidden = false ; shortcircuit = false ) {.compileTime , ... raises : [ ] ,
- tags : [ ] .}
-
-Add a boolean flag to the argument parser. The boolean will be available on the parsed options object as the longest named flag.
+
+
+
+
proc flag ( name1 : string ; name2 = "" ; multiple = false ; help = "" ;
+ hidden = false ; shortcircuit = false ) {.compileTime ,
+ ... raises : [ UsageError , ValueError ] , tags : [ ] , forbids : [ ] .}
+
+
+ Add a boolean flag to the argument parser. The boolean will be available on the parsed options object as the longest named flag.
If multiple is true then the flag can be specified multiple times and the datatype will be an int.
If hidden is true then the flag usage is not shown in the help.
If shortcircuit is true, then when the flag is encountered during processing, the parser will immediately raise a ShortCircuit error with the flag attribute set to this flag's name. This is how the default help flag is implemented.
@@ -308,22 +276,25 @@
Example:
var p = newParser ( "Some Thing" ) :
- flag ( "--show-name" , help = "Show the name" )
- flag ( "-a" , help = "Some flag named a" )
- flag ( "-n" , "--dryrun" , help = "Don't actually run" )
+ flag ( "--show-name" , help = "Show the name" )
+ flag ( "-a" , help = "Some flag named a" )
+ flag ( "-n" , "--dryrun" , help = "Don't actually run" )
let opts = p . parse ( @ [ "--show-name" , "-n" ] )
assert opts . show_name == true
assert opts . a == false
assert opts . dryrun == true
-
-
+
+
-
-
proc help ( helptext : string ) {.compileTime , ... raises : [ ] , tags : [ ] .}
-
-Add help to a parser or subcommand.
+
+
+
+
proc help ( helptext : string ) {.compileTime , ... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Add help to a parser or subcommand.
You may use the special string {prog} within any help text, and it will be replaced by the program name.
Example:
@@ -332,138 +303,213 @@
command ( "dostuff" ) :
help ( "More helpful information" )
echo p . help
+
+
+
-
-
-
proc nohelpflag ( ) {.compileTime , ... raises : [ ] , tags : [ ] .}
-
+
+
+
proc hideCompletions ( hideFlag = true ; hideOpt = true ) {.compileTime ,
+ ... raises : [ UsageError ] , tags : [ ] , forbids : [ ] .}
+
+
+ Hide completions flags from help
+Example:
+var p = newParser :
+ hideCompletions ( )
+
+
+
-Disable the automatic
-h /
--help flag
+
+
+
+
proc noCompletions ( disableFlag = true ; disableOpt = true ) {.compileTime ,
+ ... raises : [ UsageError ] , tags : [ ] , forbids : [ ] .}
+
+
+ Disable completions flags
Example:
var p = newParser :
- nohelpflag ( )
+ noCompletions ( )
+
+
+
-
-
-
proc option ( name1 : string ; name2 = "" ; help = "" ; default = none ( ) ; env = "" ;
- multiple = false ; choices : seq [ string ] = @ [ ] ; required = false ;
- hidden = false ) {.compileTime , ... raises : [ ] , tags : [ ] .}
-
+
+
+
proc nohelpflag ( ) {.compileTime , ... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Disable the automatic -h /--help flag
+Example:
+var p = newParser :
+ nohelpflag ( )
+
+
+
-
Add an option to the argument parser. The longest named flag will be used as the name on the parsed result.
+
+
+
+
proc option ( name1 : string ; name2 = "" ; help = "" ; default = none [ string ] ( ) ;
+ env = "" ; multiple = false ; choices : seq [ string ] = @ [ ] ;
+ completionsGenerator = default ( array [ ShellCompletionKind , string ] ) ;
+ required = false ; hidden = false ) {.compileTime ,
+ ... raises : [ UsageError , ValueError ] , tags : [ ] , forbids : [ ] .}
+
+
+ Add an option to the argument parser. The (--) long flag, and if not present the (-) short flag will be used as the name on the parsed result.
Additionally, an Option[string] named FLAGNAME_opt will be available on the parse result.
Set multiple to true to accept multiple options.
Set default to the default string value. If the value can't be inferred at compile-time, insert it in the run block while accesing the option with opts.FLAGNAME_opt.get(otherwise = RunTimeString) instead.
Set env to an environment variable name to use as the default value
Set choices to restrict the possible choices.
+Set completionGenerator , with string at index given by shell kind. The string is executable in the target shell and will return a list of completions for the option. It is not necessary to provide for every shell kind, however completion generator output will only be available where a generator string is provided.
Set required = true if this is a required option. Yes, calling it a "required option" is a paradox :)
Set hidden to prevent the option usage listing in the help text.
help is additional help text for this option.
Example:
var p = newParser :
- option ( "-a" , "--apple" , help = "Name of apple" )
+ option ( "-a" , "--apple" , help = "Name of apple" )
assert p . parse ( @ [ "-a" , "5" ] ) . apple == "5"
assert p . parse ( @ [ ] ) . apple_opt . isNone
assert p . parse ( @ [ "--apple" , "6" ] ) . apple_opt . get ( ) == "6"
+Example:
+var p = newParser :
+ option (
+ "-f" ,
+ "--file" ,
+ default = some ( "default.txt" ) ,
+ help = "Output file" ,
+ completionsGenerator = [
+ ShellCompletionKind . sckFish : "__fish_complete_path" ,
+ ] ,
+ )
+ option (
+ "-p" ,
+ "--pid" ,
+ env = "MYAPP_PID" ,
+ help = "Process ID" ,
+ completionsGenerator = [
+ ShellCompletionKind . sckFish : "__fish_complete_pids" ,
+ ] ,
+ )
+
+
+
+
-
-
+
+
-
-
-
-
template command ( name : string ; content : untyped ) : untyped
-
-
-Add a subcommand to this parser
+
+
+
+
+
template command ( name : string ; content : untyped ) : untyped
+
+
+ Add a subcommand to this parser
Example:
var p = newParser :
command ( "dostuff" ) :
run :
echo "Actually do stuff"
p . run ( @ [ "dostuff" ] )
-
-
+
+
-
template command ( name : string ; group : string ; content : untyped ) : untyped
-
-
-Add a subcommand to this parser
+ template command ( name : string ; group : string ; content : untyped ) : untyped
+
+
+ Add a subcommand to this parser
group is a string used to group commands in help output
Example:
var p = newParser :
- command ( "dostuff" , "groupA" ) : discard
- command ( "morestuff" , "groupB" ) : discard
- command ( "morelikethefirst" , "groupA" ) : discard
+ command ( "dostuff" , "groupA" ) :
+ discard
+ command ( "morestuff" , "groupB" ) :
+ discard
+ command ( "morelikethefirst" , "groupA" ) :
+ discard
echo p . help
-
-
+
+
-
-
template newParser ( body : untyped ) : untyped
-
-Create a new command-line parser named the same as the current executable.
+
+
+
+
template newParser ( body : untyped ) : untyped
+
+
+ Create a new command-line parser named the same as the current executable.
Example:
var p = newParser :
flag ( "-a" )
assert p . parse ( @ [ "-a" ] ) . a == true
-
-
+
+
-
template newParser ( name : string ; body : untyped ) : untyped
-
-
-Create a new parser with a static program name.
+ template newParser ( name : string ; body : untyped ) : untyped
+
+
+ Create a new parser with a static program name.
Example:
var p = newParser ( "my parser" ) :
help ( "'{prog}' == 'my parser'" )
flag ( "-a" )
assert p . parse ( @ [ "-a" ] ) . a == true
-
-
+
+
-
-
template run ( body : untyped ) : untyped
-
-Add a run block to this command
+
+
+
+
template run ( body : untyped ) : untyped
+
+
+ Add a run block to this command
Example:
var p = newParser :
command ( "dostuff" ) :
run :
echo "Actually do stuff"
+
+
+
-
-
+
+
-
-
-setOrAdd , ComponentKind , popleft , ARGPARSE_STDOUT , newBuilder , consume , optsTypeDef , addParser , setOrAdd , ShortCircuit , parseProcDef , raiseShortCircuit , getHelpText , popright , Component , toVarname , newParseState , builderStack , parserTypeDef , add_runProc , helpProcDef , Builder , ParseState , generateDefs , $ , GenResponse , skip , BuilderObj , $ , allChildren , add_command , UsageError , getInsertionPoint , add , hasElse , parentOf , add , newIfStatement , isValid , newObjectTypeDef , isValid , newCaseStatement , finalize , UnfinishedObjectTypeDef , parentOf , replaceNodes , ident , addElse , UnfinishedCase , nimRepr , clear , add , addObjectField , add , newIdentNode , finalize , addElse , add , newCaseStatement , add , addObjectField , replace
-
+
+
+ ShellCompletionKind , UsageError , ShortCircuit , BuilderObj , Component , Builder , sckFish , ComponentKind , setOrAdd , popleft , ARGPARSE_STDOUT , newBuilder , optsTypeDef , addParser , setOrAdd , parseProcDef , raiseShortCircuit , getHelpText , popright , toVarname , newParseState , builderStack , parserTypeDef , add_runProc , helpProcDef , ParseState , generateDefs , $ , GenResponse , $ , skip , doUsageAssert , consume , allChildren , add_command , getInsertionPoint , add , hasElse , parentOf , add , newIfStatement , isValid , newObjectTypeDef , isValid , newCaseStatement , finalize , UnfinishedObjectTypeDef , parentOf , replaceNodes , ident , addElse , UnfinishedCase , nimRepr , clear , add , addObjectField , add , newIdentNode , finalize , addElse , add , newCaseStatement , add , addObjectField , replace , deriveShellFromEnvVar , COMPLETION_OPT_VARNAME
+
+
-
-
- Made with Nim. Generated: 2023-03-15 13:20:35 UTC
+
+ Made with Nim. Generated: 2026-01-26 01:59:30 UTC
-
-
+
diff --git a/docs/argparse.idx b/docs/argparse.idx
index 746dd2e..21fb049 100644
--- a/docs/argparse.idx
+++ b/docs/argparse.idx
@@ -1,10 +1,15 @@
-newParser argparse.html#newParser.t,string,untyped argparse: newParser(name: string; body: untyped): untyped
-newParser argparse.html#newParser.t,untyped argparse: newParser(body: untyped): untyped
-flag argparse.html#flag,string,string,string argparse: flag(name1: string; name2 = ""; multiple = false; help = ""; hidden = false;\n shortcircuit = false)
-option argparse.html#option,string,string,string,string,seq[string] argparse: option(name1: string; name2 = ""; help = ""; default = none(); env = "";\n multiple = false; choices: seq[string] = @[]; required = false;\n hidden = false)
-arg argparse.html#arg,string,string,string,int argparse: arg(varname: string; default = none(); env = ""; help = ""; nargs = 1)
-help argparse.html#help,string argparse: help(helptext: string)
-nohelpflag argparse.html#nohelpflag argparse: nohelpflag()
-run argparse.html#run.t,untyped argparse: run(body: untyped): untyped
-command argparse.html#command.t,string,string,untyped argparse: command(name: string; group: string; content: untyped): untyped
-command argparse.html#command.t,string,untyped argparse: command(name: string; content: untyped): untyped
+nimTitle argparse argparse.html module argparse 0
+nim newParser argparse.html#newParser.t,string,untyped template newParser(name: string; body: untyped): untyped 144
+nim newParser argparse.html#newParser.t,untyped template newParser(body: untyped): untyped 163
+nim flag argparse.html#flag,string,string,string proc flag(name1: string; name2 = ""; multiple = false; help = ""; hidden = false;\n shortcircuit = false) 182
+nim option argparse.html#option,string,string,string,string,seq[string] proc option(name1: string; name2 = ""; help = ""; default = none[string](); env = "";\n multiple = false; choices: seq[string] = @[];\n completionsGenerator = default(array[ShellCompletionKind, string]);\n required = false; hidden = false) 229
+nim arg argparse.html#arg,string,string,string,int proc arg(varname: string; default = none[string](); env = ""; help = "";\n completionsGenerator = default(array[ShellCompletionKind, string]);\n nargs = 1) 314
+nim help argparse.html#help,string proc help(helptext: string) 361
+nim nohelpflag argparse.html#nohelpflag proc nohelpflag() 376
+nim run argparse.html#run.t,untyped template run(body: untyped): untyped 384
+nim command argparse.html#command.t,string,string,untyped template command(name: string; group: string; content: untyped): untyped 394
+nim command argparse.html#command.t,string,untyped template command(name: string; content: untyped): untyped 410
+nim noCompletions argparse.html#noCompletions proc noCompletions(disableFlag = true; disableOpt = true) 420
+nim hideCompletions argparse.html#hideCompletions proc hideCompletions(hideFlag = true; hideOpt = true) 439
+nimgrp newparser argparse.html#newParser-templates-all template 144
+nimgrp command argparse.html#command-templates-all template 394
diff --git a/docs/argparse/backend.html b/docs/argparse/backend.html
index 105d320..6c692c7 100644
--- a/docs/argparse/backend.html
+++ b/docs/argparse/backend.html
@@ -1,158 +1,65 @@
-
+
-
+
-
-
-
-
-
+argparse/backend
+
+
+
+
-src/argparse/backend
-
-
-
-
-
+
+
+
-
-
-
src/argparse/backend
-
+
+
+
argparse/backend
+
-
-
-
- Search:
-
-
- Group by:
-
- Section
- Type
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
BuilderObj {.acyclic .} = object
- name * : string
-
- symbol * : string
-
-
- components * : seq [ Component ]
- help * : string
- groupName * : string
- children * : seq [ Builder ]
- parent * : Option [ Builder ]
- runProcBodies * : seq [ NimNode ]
-
-
+
+
+
-
-
-
Component = object
- varname * : string
- hidden * : bool
- help * : string
- env * : string
- case kind * : ComponentKind
- of ArgFlag :
- flagShort * : string
- flagLong * : string
- flagMultiple * : bool
- shortCircuit * : bool
+
+
+helpProcDef
+ helpProcDef(b: Builder): NimNode
- of ArgOption :
- optShort * : string
- optLong * : string
- optMultiple * : bool
- optDefault * : Option [ string ]
- optChoices * : seq [ string ]
- optRequired * : bool
+
+
+
-
+
+
+
+
-
-
-
ComponentKind = enum
- ArgFlag , ArgOption , ArgArgument
-
+
+
+
+
-
-
-
GenResponse = tuple [ types : NimNode , procs : NimNode , instance : NimNode ]
-
+
+
+
+
+
+
+
+
+
+
+ Templates
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
GenResponse = tuple [ types : NimNode , procs : NimNode , instance : NimNode ]
+
+
+
+
+
-
ParseState = object
+ ParseState = object
tokens * : seq [ string ]
cursor * : int
extra * : seq [ string ]
@@ -395,260 +221,325 @@
key * : Option [ string ]
value * : Option [ string ]
valuePartOfToken * : bool
- runProcs * : seq [ proc ( ) ]
-
-
-
-
-
-
-
-
-
ShortCircuit = object of CatchableError
- flag * : string
- help * : string
-
-
-
-
-
-
+
runProcs * : seq [ proc ( ) ]
+
+
+
+
+
-
-
-
-
-
-
-
proc `$` ( b : Builder ) : string {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
+
+
+
+
proc `$` ( b : Builder ) : string {.... raises : [ Exception ] , tags : [ RootEffect ] ,
+ forbids : [ ] .}
+
+
+
+
+
-
proc `$` ( state : ref ParseState ) : string {.inline , ... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
proc `$` ( state : ref ParseState ) : string {.inline , ... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+
+
+
-
-
proc add_command ( name : string ; group : string ; content : proc ( ) ) {.compileTime ,
- ... raises : [ ] , tags : [ ] .}
-
-Add a subcommand to a parser
-
-
-
-
proc add_runProc ( body : NimNode ) {.compileTime , ... raises : [ ] , tags : [ ] .}
-
-
-Add a run block proc to the current parser
-
-
+
+
+
proc add_command ( name : string ; group : string ; content : proc ( ) ) {.compileTime ,
+ ... raises : [ Exception ] , tags : [ RootEffect ] , forbids : [ ] .}
+
+
+ Add a subcommand to a parser
+
+
-
-
proc addParser ( name : string ; group : string ; content : proc ( ) ) : Builder {.
- ... raises : [ ] , tags : [ ] .}
-
-
-Add a parser (whether main parser or subcommand) and return the Builder Call generateDefs to get the type and proc definitions.
-
-
-
proc allChildren ( builder : Builder ) : seq [ Builder ] {.... raises : [ ] , tags : [ ] .}
-
-
-Return all the descendents of this builder
-
-
+
+
+
proc add_runProc ( body : NimNode ) {.compileTime , ... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Add a run block proc to the current parser
+
+
-
-
-
proc generateDefs ( builder : Builder ) : NimNode {.... raises : [ ValueError , KeyError ] ,
- tags : [ ] .}
-
-
-Generate the AST definitions for the current builder
-
-
+
+
+
proc addParser ( name : string ; group : string ; content : proc ( ) ) : Builder {.
+ ... raises : [ Exception ] , tags : [ RootEffect ] , forbids : [ ] .}
+
+
+ Add a parser (whether main parser or subcommand) and return the Builder Call generateDefs to get the type and proc definitions.
+
+
-
-
proc getHelpText ( b : Builder ) : string {.... raises : [ ValueError , KeyError ] , tags : [ ] .}
-
-
-Generate the static help text string
-
-
-
proc helpProcDef ( b : Builder ) : NimNode {.... raises : [ ValueError , KeyError ] , tags : [ ] .}
-
-
-Generate the help proc for the parser
-
-
+
+
+
proc allChildren ( builder : Builder ) : seq [ Builder ] {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Return all the descendents of this builder
+
+
-
-
-
proc newParseState ( args : openArray [ string ] ) : ref ParseState {.... raises : [ ] ,
- tags : [ ] .}
-
-
-
-
-
+
+
+
proc consume ( state : ref ParseState ; thing : ComponentKind ) {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Advance the parser, marking some tokens as consumed.
+
+
-
-
proc optsTypeDef ( b : Builder ) : NimNode {.... raises : [ ValueError ] , tags : [ ] .}
-
-Generate the type definition for the return value of parsing:
-
-
-
-
proc parseProcDef ( b : Builder ) : NimNode {.... raises : [ ValueError ] , tags : [ ] .}
-
-
-Generate the parse proc for this Builder
-proc parse(p: MyParser, args: seq[string]): MyOpts =
-
-
-
+
+
+
proc generateDefs ( builder : Builder ) : NimNode {.... raises : [ ValueError , KeyError ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Generate the AST definitions for the current builder
+
+
-
-
proc parserTypeDef ( b : Builder ) : NimNode {.... raises : [ ] , tags : [ ] .}
-
-Generate the type definition for the Parser object:type
-MyParser = object
-
+
+
+
+
proc getHelpText ( b : Builder ) : string {.... raises : [ KeyError ] , tags : [ ] , forbids : [ ] .}
+
+
+ Generate the static help text string
+
+
+
+
+
+
+
proc helpProcDef ( b : Builder ) : NimNode {.... raises : [ KeyError ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Generate the help proc for the parser
+
+
+
-
-
-
proc popleft [ T ] ( s : var seq [ T ] ) : T
-
+
+
+
proc newBuilder ( name = "" ) : Builder {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
-Pop from the front of a seq
+
+
+
+
proc newParseState ( args : openArray [ string ] ) : ref ParseState {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
-
-
-
proc popright [ T ] ( s : var seq [ T ] ; n = 0 ) : T
-
+
+
+
proc optsTypeDef ( b : Builder ) : NimNode {.... raises : [ ValueError ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Generate the type definition for the return value of parsing:
+
+
+
-Pop the nth item from the end of a seq
+
+
+
+
proc parseProcDef ( b : Builder ) : NimNode {.... raises : [ ValueError ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Generate the parse proc for this Builder
+proc parse ( p : MyParser , args : seq [ string ] ) : MyOpts =
-
+
+
-
-
proc raiseShortCircuit ( flagname : string ; help : string ) {.inline ,
- ... raises : [ ShortCircuit ] , tags : [ ] .}
-
+
+
+
+
proc parserTypeDef ( b : Builder ) : NimNode {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Generate the type definition for the Parser object:
+type MyParser = object
+
+
+
-
-
-
proc setOrAdd ( x : var seq [ string ] ; val : string ) {.... raises : [ ] , tags : [ ] .}
-
+
+
+
proc popleft [ T ] ( s : var seq [ T ] ) : T
+
+
+ Pop from the front of a seq
+
+
+
+
+
+
+
proc popright [ T ] ( s : var seq [ T ] ; n = 0 ) : T
+
+
+ Pop the nth item from the end of a seq
+
+
+
+
+
+
+
proc raiseShortCircuit ( flagname : string ; help : string ) {.inline ,
+ ... raises : [ ShortCircuit ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
-
+
+
+
+
proc setOrAdd ( x : var seq [ string ] ; val : string ) {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+
+
+
-
proc setOrAdd ( x : var string ; val : string ) {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
proc setOrAdd ( x : var string ; val : string ) {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
-
-
proc skip ( state : ref ParseState ) {.inline , ... raises : [ ] , tags : [ ] .}
-
+
+
+
+
proc skip ( state : ref ParseState ) {.inline , ... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
+
+
+
+
proc toVarname ( x : string ) : string {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Convert x to something suitable as a Nim identifier Replaces - with _ for instance
+
+
+
-
-
-
proc toVarname ( x : string ) : string {.... raises : [ ] , tags : [ ] .}
-
-Convert x to something suitable as a Nim identifier Replaces - with _ for instance
+
+
+
+
+
+
+
+
template doUsageAssert ( condition : bool ; msg : string ) : untyped
+
+
+ Raise a UsageError if condition is false
+
+
+
-
-
+
+
-
-
- Made with Nim. Generated: 2023-03-15 13:20:33 UTC
+
+ Made with Nim. Generated: 2026-01-26 01:59:29 UTC
-
-
+
diff --git a/docs/argparse/backend.idx b/docs/argparse/backend.idx
index 92c5769..1f3aaf3 100644
--- a/docs/argparse/backend.idx
+++ b/docs/argparse/backend.idx
@@ -1,35 +1,30 @@
-UsageError argparse/backend.html#UsageError backend: UsageError
-ShortCircuit argparse/backend.html#ShortCircuit backend: ShortCircuit
-ArgFlag argparse/backend.html#ArgFlag ComponentKind.ArgFlag
-ArgOption argparse/backend.html#ArgOption ComponentKind.ArgOption
-ArgArgument argparse/backend.html#ArgArgument ComponentKind.ArgArgument
-ComponentKind argparse/backend.html#ComponentKind backend: ComponentKind
-Component argparse/backend.html#Component backend: Component
-Builder argparse/backend.html#Builder backend: Builder
-BuilderObj argparse/backend.html#BuilderObj backend: BuilderObj
-ParseState argparse/backend.html#ParseState backend: ParseState
-ARGPARSE_STDOUT argparse/backend.html#ARGPARSE_STDOUT backend: ARGPARSE_STDOUT
-builderStack argparse/backend.html#builderStack backend: builderStack
-toVarname argparse/backend.html#toVarname,string backend: toVarname(x: string): string
-`$` argparse/backend.html#$,ref.ParseState backend: `$`(state: ref ParseState): string
-newParseState argparse/backend.html#newParseState,openArray[string] backend: newParseState(args: openArray[string]): ref ParseState
-consume argparse/backend.html#consume,ref.ParseState,ComponentKind backend: consume(state: ref ParseState; thing: ComponentKind)
-skip argparse/backend.html#skip,ref.ParseState backend: skip(state: ref ParseState)
-popleft argparse/backend.html#popleft,seq[T] backend: popleft[T](s: var seq[T]): T
-popright argparse/backend.html#popright,seq[T],int backend: popright[T](s: var seq[T]; n = 0): T
-newBuilder argparse/backend.html#newBuilder,string backend: newBuilder(name = ""): Builder
-`$` argparse/backend.html#$,Builder backend: `$`(b: Builder): string
-optsTypeDef argparse/backend.html#optsTypeDef,Builder backend: optsTypeDef(b: Builder): NimNode
-parserTypeDef argparse/backend.html#parserTypeDef,Builder backend: parserTypeDef(b: Builder): NimNode
-raiseShortCircuit argparse/backend.html#raiseShortCircuit,string,string backend: raiseShortCircuit(flagname: string; help: string)
-parseProcDef argparse/backend.html#parseProcDef,Builder backend: parseProcDef(b: Builder): NimNode
-setOrAdd argparse/backend.html#setOrAdd,string,string backend: setOrAdd(x: var string; val: string)
-setOrAdd argparse/backend.html#setOrAdd,seq[string],string backend: setOrAdd(x: var seq[string]; val: string)
-getHelpText argparse/backend.html#getHelpText,Builder backend: getHelpText(b: Builder): string
-helpProcDef argparse/backend.html#helpProcDef,Builder backend: helpProcDef(b: Builder): NimNode
-GenResponse argparse/backend.html#GenResponse backend: GenResponse
-addParser argparse/backend.html#addParser,string,string,proc) backend: addParser(name: string; group: string; content: proc ()): Builder
-add_runProc argparse/backend.html#add_runProc,NimNode backend: add_runProc(body: NimNode)
-add_command argparse/backend.html#add_command,string,string,proc) backend: add_command(name: string; group: string; content: proc ())
-allChildren argparse/backend.html#allChildren,Builder backend: allChildren(builder: Builder): seq[Builder]
-generateDefs argparse/backend.html#generateDefs,Builder backend: generateDefs(builder: Builder): NimNode
+nimTitle backend argparse/backend.html module argparse/backend 0
+nim ParseState argparse/backend.html#ParseState object ParseState 21
+nim doUsageAssert argparse/backend.html#doUsageAssert.t,bool,string template doUsageAssert(condition: bool; msg: string): untyped 33
+nim ARGPARSE_STDOUT argparse/backend.html#ARGPARSE_STDOUT var ARGPARSE_STDOUT 38
+nim builderStack argparse/backend.html#builderStack var builderStack 39
+nim toVarname argparse/backend.html#toVarname,string proc toVarname(x: string): string 41
+nim `$` argparse/backend.html#$,ref.ParseState proc `$`(state: ref ParseState): string 50
+nim newParseState argparse/backend.html#newParseState,openArray[string] proc newParseState(args: openArray[string]): ref ParseState 86
+nim consume argparse/backend.html#consume,ref.ParseState,ComponentKind proc consume(state: ref ParseState; thing: ComponentKind) 93
+nim skip argparse/backend.html#skip,ref.ParseState proc skip(state: ref ParseState) 103
+nim popleft argparse/backend.html#popleft,seq[T] proc popleft[T](s: var seq[T]): T 126
+nim popright argparse/backend.html#popright,seq[T],int proc popright[T](s: var seq[T]; n = 0): T 134
+nim newBuilder argparse/backend.html#newBuilder,string proc newBuilder(name = ""): Builder 189
+nim `$` argparse/backend.html#$,Builder proc `$`(b: Builder): string 213
+nim optsTypeDef argparse/backend.html#optsTypeDef,Builder proc optsTypeDef(b: Builder): NimNode 221
+nim parserTypeDef argparse/backend.html#parserTypeDef,Builder proc parserTypeDef(b: Builder): NimNode 263
+nim raiseShortCircuit argparse/backend.html#raiseShortCircuit,string,string proc raiseShortCircuit(flagname: string; help: string) 274
+nim parseProcDef argparse/backend.html#parseProcDef,Builder proc parseProcDef(b: Builder): NimNode 283
+nim setOrAdd argparse/backend.html#setOrAdd,string,string proc setOrAdd(x: var string; val: string) 706
+nim setOrAdd argparse/backend.html#setOrAdd,seq[string],string proc setOrAdd(x: var seq[string]; val: string) 709
+nim getHelpText argparse/backend.html#getHelpText,Builder proc getHelpText(b: Builder): string 712
+nim helpProcDef argparse/backend.html#helpProcDef,Builder proc helpProcDef(b: Builder): NimNode 856
+nim GenResponse argparse/backend.html#GenResponse tuple GenResponse 870
+nim addParser argparse/backend.html#addParser,string,string,proc) proc addParser(name: string; group: string; content: proc ()): Builder 872
+nim add_runProc argparse/backend.html#add_runProc,NimNode proc add_runProc(body: NimNode) 889
+nim add_command argparse/backend.html#add_command,string,string,proc) proc add_command(name: string; group: string; content: proc ()) 893
+nim allChildren argparse/backend.html#allChildren,Builder proc allChildren(builder: Builder): seq[Builder] 897
+nim generateDefs argparse/backend.html#generateDefs,Builder proc generateDefs(builder: Builder): NimNode 903
+nimgrp $ argparse/backend.html#$-procs-all proc 50
+nimgrp setoradd argparse/backend.html#setOrAdd-procs-all proc 706
diff --git a/docs/argparse/filler.html b/docs/argparse/filler.html
index 86fd037..87a23a8 100644
--- a/docs/argparse/filler.html
+++ b/docs/argparse/filler.html
@@ -1,340 +1,318 @@
-
+
-
+
-
-
-
-
-
+
argparse/filler
+
+
+
+
-
src/argparse/filler
-
-
-
-
-
+
+
+
-
-
-
src/argparse/filler
-
+
+
+
argparse/filler
+
-
-
-
-
-
-
-
-
-
-
ArgFiller = object
- slots : seq [ Slot ]
- counts : CountTableRef [ SlotKind ]
-
-
-
-
+
+
-
-
-
-
SlotKind = enum
- Required , Optional , Wildcard
-
+
+
+
+
-
+
+
-
-
-
-
-
-
proc generate ( filler ; containerName : string ) : NimNode {.... raises : [ ] , tags : [ ] .}
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
proc hasVariableArgs ( filler ) : bool {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
-
-
proc hasWildcard ( filler ) : bool {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
+
SlotKind = enum
+ Required , Optional , Wildcard
+
+
+
+
+
-
-
proc minArgs ( filler ) : int {.... raises : [ ] , tags : [ ] .}
-
-
-
-
+
-
-
proc missing ( filler ; nargs : int ) : seq [ string ] {.... raises : [ ] , tags : [ ] .}
-
-
-Given the number of arguments, which required arguments will not get a value?
-
-
+
+
+
+
+
+
proc channels ( filler ; nargs : int ) : seq [ FillChannel ] {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Given the number of arguments, show where those arguments will go
+
+
-
-
-
proc numArgsAfterWildcard ( filler ) : int {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
+
+
proc generate ( filler ; containerName : string ) : NimNode {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+
+
+
-
-
proc optional ( filler ; argname : string ) {.... raises : [ ] , tags : [ ] .}
-
-
+
+
+
+
proc hasVariableArgs ( filler ) : bool {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
-
-
-
proc required ( filler ; argname : string ; nargs = 1 ) {.... raises : [ ] , tags : [ ] .}
-
+
+
+
proc hasWildcard ( filler ) : bool {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
+
+
+
+
proc minArgs ( filler ) : int {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
+
+
+
+
proc missing ( filler ; nargs : int ) : seq [ string ] {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Given the number of arguments, which required arguments will not get a value?
+
+
+
-
-
-
proc upperBreakpoint ( filler ) : int {.... raises : [ ] , tags : [ ] .}
-
+
+
+
+
+
proc optional ( filler ; argname : string ) {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
-
-
-
proc wildcard ( filler ; argname : string ) {.... raises : [ ValueError ] , tags : [ ] .}
-
+
+
+
proc required ( filler ; argname : string ; nargs = 1 ) {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+
+
+
+
+
+
+
+
proc upperBreakpoint ( filler ) : int {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
+
+
+
+
proc wildcard ( filler ; argname : string ) {.... raises : [ ValueError ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+
+
+
+
-
-
+
+
-
-
- Made with Nim. Generated: 2023-03-15 13:20:33 UTC
+
+ Made with Nim. Generated: 2026-01-26 01:59:28 UTC
-
-
+
diff --git a/docs/argparse/filler.idx b/docs/argparse/filler.idx
index c630c77..9e7fabd 100644
--- a/docs/argparse/filler.idx
+++ b/docs/argparse/filler.idx
@@ -1,18 +1,19 @@
-Required argparse/filler.html#Required SlotKind.Required
-Optional argparse/filler.html#Optional SlotKind.Optional
-Wildcard argparse/filler.html#Wildcard SlotKind.Wildcard
-SlotKind argparse/filler.html#SlotKind filler: SlotKind
-ArgFiller argparse/filler.html#ArgFiller filler: ArgFiller
-FillChannel argparse/filler.html#FillChannel filler: FillChannel
-newArgFiller argparse/filler.html#newArgFiller filler: newArgFiller(): ref ArgFiller
-required argparse/filler.html#required,,string,int filler: required(filler; argname: string; nargs = 1)
-optional argparse/filler.html#optional,,string filler: optional(filler; argname: string)
-wildcard argparse/filler.html#wildcard,,string filler: wildcard(filler; argname: string)
-minArgs argparse/filler.html#minArgs filler: minArgs(filler): int
-numArgsAfterWildcard argparse/filler.html#numArgsAfterWildcard filler: numArgsAfterWildcard(filler): int
-hasVariableArgs argparse/filler.html#hasVariableArgs filler: hasVariableArgs(filler): bool
-hasWildcard argparse/filler.html#hasWildcard filler: hasWildcard(filler): bool
-upperBreakpoint argparse/filler.html#upperBreakpoint filler: upperBreakpoint(filler): int
-channels argparse/filler.html#channels,,int filler: channels(filler; nargs: int): seq[FillChannel]
-missing argparse/filler.html#missing,,int filler: missing(filler; nargs: int): seq[string]
-generate argparse/filler.html#generate,,string filler: generate(filler; containerName: string): NimNode
+nimTitle filler argparse/filler.html module argparse/filler 0
+nim Required argparse/filler.html#Required SlotKind.Required 4
+nim Optional argparse/filler.html#Optional SlotKind.Optional 4
+nim Wildcard argparse/filler.html#Wildcard SlotKind.Wildcard 4
+nim SlotKind argparse/filler.html#SlotKind enum SlotKind 4
+nim ArgFiller argparse/filler.html#ArgFiller object ArgFiller 17
+nim FillChannel argparse/filler.html#FillChannel tuple FillChannel 21
+nim newArgFiller argparse/filler.html#newArgFiller proc newArgFiller(): ref ArgFiller 26
+nim required argparse/filler.html#required,,string,int proc required(filler; argname: string; nargs = 1) 33
+nim optional argparse/filler.html#optional,,string proc optional(filler; argname: string) 37
+nim wildcard argparse/filler.html#wildcard,,string proc wildcard(filler; argname: string) 41
+nim minArgs argparse/filler.html#minArgs proc minArgs(filler): int 47
+nim numArgsAfterWildcard argparse/filler.html#numArgsAfterWildcard proc numArgsAfterWildcard(filler): int 52
+nim hasVariableArgs argparse/filler.html#hasVariableArgs proc hasVariableArgs(filler): bool 66
+nim hasWildcard argparse/filler.html#hasWildcard proc hasWildcard(filler): bool 69
+nim upperBreakpoint argparse/filler.html#upperBreakpoint proc upperBreakpoint(filler): int 72
+nim channels argparse/filler.html#channels,,int proc channels(filler; nargs: int): seq[FillChannel] 75
+nim missing argparse/filler.html#missing,,int proc missing(filler; nargs: int): seq[string] 101
+nim generate argparse/filler.html#generate,,string proc generate(filler; containerName: string): NimNode 112
diff --git a/docs/argparse/macrohelp.html b/docs/argparse/macrohelp.html
index 62d241d..a6cdd63 100644
--- a/docs/argparse/macrohelp.html
+++ b/docs/argparse/macrohelp.html
@@ -1,557 +1,522 @@
-
+
-
+
-
-
-
-
-
+argparse/macrohelp
+
+
+
+
-src/argparse/macrohelp
-
-
-
-
-
+
+
+
-
-
-
src/argparse/macrohelp
-
+
+
+
argparse/macrohelp
+
-
-
-
- Search:
-
-
- Group by:
-
- Section
- Type
-
-
-
+
+
+ Search:
+
+
+ Group by:
+
+ Section
+ Type
+
+
+
+
- Consts
-
+
+ Consts
+
+
- Procs
-
+
+ Procs
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
UnfinishedCase = object
- root * : NimNode
- cases * : seq [ NimNode ]
- elsebody * : NimNode
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
ident = ident
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
UnfinishedCase = object
+ root * : NimNode
+ cases * : seq [ NimNode ]
+ elsebody * : NimNode
+
+
+
+
+
+
+
-
-
-
-
-
-
proc add ( n : ref UnfinishedCase ; opt : int ; body : NimNode ) {.... raises : [ ] , tags : [ ] .}
-
-
-Adds an integer branch to an UnfinishedCase
+
+
+
+
+
+
+
ident = newIdentNode
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
proc add ( n : ref UnfinishedCase ; opt : int ; body : NimNode ) {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Adds an integer branch to an UnfinishedCase
+
+
-
proc add ( n : ref UnfinishedCase ; opt : NimNode ; body : NimNode ) {.... raises : [ ] ,
- tags : [ ] .}
-
-
-Adds a branch to an UnfinishedCase
-
-
+
proc add ( n : ref UnfinishedCase ; opt : NimNode ; body : NimNode ) {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Adds a branch to an UnfinishedCase
+
+
-
proc add ( n : ref UnfinishedCase ; opt : seq [ NimNode ] ; body : NimNode ) {.... raises : [ ] ,
- tags : [ ] .}
-
+ proc add ( n : ref UnfinishedCase ; opt : seq [ NimNode ] ; body : NimNode ) {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Adds a branch to an UnfinishedCase
+Usage: var c = newCaseStatement("foo") c.add(@newLit("apple"), newLit("banana") , quote do: echo "apple or banana" )
-Adds a branch to an UnfinishedCaseUsage:
-var c = newCaseStatement("foo")c.add(@[newLit("apple"), newLit("banana")], quote do:
-echo "apple or banana"
-
-)
-
-
-
-
-
+
+
-
proc add ( n : ref UnfinishedCase ; opt : string ; body : NimNode ) {.... raises : [ ] ,
- tags : [ ] .}
-
-
-Adds a branch to an UnfinishedCasec.add("foo", quote do:
-echo "value was foo"
-
-)
-
+ proc add ( n : ref UnfinishedCase ; opt : string ; body : NimNode ) {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Adds a branch to an UnfinishedCase
+c.add("foo", quote do: echo "value was foo" )
-
+
+
-
proc add ( n : ref UnfinishedCase ; opts : seq [ string ] ; body : NimNode ) {.... raises : [ ] ,
- tags : [ ] .}
-
+ proc add ( n : ref UnfinishedCase ; opts : seq [ string ] ; body : NimNode ) {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Adds a branch to an UnfinishedCase
+c.add(@"foo", "foo-also" , quote do: echo "value was foo" )
-Adds a branch to an UnfinishedCasec.add(@["foo", "foo-also"], quote do:
-echo "value was foo"
-
-)
-
-
-
+
+
-
proc add ( n : ref UnfinishedIf ; cond : NimNode ; body : NimNode ) {.... raises : [ ] ,
- tags : [ ] .}
-
-
-Add a branch to an if statement
+ proc add ( n : ref UnfinishedIf ; cond : NimNode ; body : NimNode ) {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Add a branch to an if statement
var f = newIfStatement() f.add()
-
-
+
+
-
-
proc addElse ( n : ref UnfinishedCase ; body : NimNode ) {.... raises : [ ] , tags : [ ] .}
-
-Add an else: to an UnfinishedCase
-
-
-
-
proc addElse ( n : ref UnfinishedIf ; body : NimNode ) {.... raises : [ ] , tags : [ ] .}
-
-
-Add an else: to an UnfinishedIf
-
-
+
+
+
proc addElse ( n : ref UnfinishedCase ; body : NimNode ) {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Add an else: to an UnfinishedCase
+
+
-
-
proc addObjectField ( objtypedef : UnfinishedObjectTypeDef ; name : string ;
- kind : NimNode ) {.compileTime , ... raises : [ ] , tags : [ ] .}
-
-
-Adds a field to an object definition created by newObjectTypeDef
-
-
+
+
proc addElse ( n : ref UnfinishedIf ; body : NimNode ) {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Add an else: to an UnfinishedIf
+
+
+
+
+
+
+
+
proc addObjectField ( objtypedef : UnfinishedObjectTypeDef ; name : string ;
+ kind : NimNode ) {.compileTime , ... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Adds a field to an object definition created by newObjectTypeDef
+
+
-
proc addObjectField ( objtypedef : UnfinishedObjectTypeDef ; name : string ;
+ proc addObjectField ( objtypedef : UnfinishedObjectTypeDef ; name : string ;
kind : string ; isref : bool = false ) {.compileTime ,
- ... raises : [ ] , tags : [ ] .}
-
-
-Adds a field to an object definition created by newObjectTypeDef
-
-
+
... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Adds a field to an object definition created by newObjectTypeDef
+
+
-
-
proc clear ( point : InsertionPoint ) : int {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
-
proc finalize ( n : ref UnfinishedCase ) : NimNode {.... raises : [ ] , tags : [ ] .}
-
-
-
+
+
+
proc clear ( point : InsertionPoint ) : int {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
-
+
+
+
-
proc finalize ( n : ref UnfinishedIf ) : NimNode {.... raises : [ ] , tags : [ ] .}
-
-
-Finish an If statement
-
-
+
proc finalize ( n : ref UnfinishedIf ) : NimNode {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Finish an If statement
+
+
-
-
proc getInsertionPoint ( node : var NimNode ; name : string ) : InsertionPoint {.
- ... raises : [ ] , tags : [ ] .}
-
-Return a node pair that you can replace with something else
-
-
-
-
proc hasElse ( n : ref UnfinishedCase ) : bool {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
+
+
proc getInsertionPoint ( node : var NimNode ; name : string ) : InsertionPoint {.
+ ... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Return a node pair that you can replace with something else
+
+
-
-
-
proc isValid ( n : ref UnfinishedIf ) : bool {.... raises : [ ] , tags : [ ] .}
-
-
-
-
-
+
+
-
-
proc newCaseStatement ( key : NimNode ) : ref UnfinishedCase {.... raises : [ ] , tags : [ ] .}
-
-Create a new, unfinished case statement. Call finalize to finish it.
+
+
+
+
+
proc isValid ( n : ref UnfinishedIf ) : bool {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
+
+
+
+
+
+
proc newCaseStatement ( key : NimNode ) : ref UnfinishedCase {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Create a new, unfinished case statement. Call finalize to finish it.
case(key )
-
-
+
+
-
-
proc newIfStatement ( ) : ref UnfinishedIf {.... raises : [ ] , tags : [ ] .}
-
-Create an unfinished if statement.
-
-
-
-
proc newObjectTypeDef ( name : string ; isref : bool = false ) : UnfinishedObjectTypeDef {.
- compileTime , ... raises : [ ] , tags : [ ] .}
-
-
-Creates:root ->
-type
-{name} = object
-
-
-
-insertion -> ...
-
-
-
+
+
+
proc newIfStatement ( ) : ref UnfinishedIf {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Create an unfinished if statement.
+
+
-
-
proc nimRepr ( n : NimNode ) : string {.... raises : [ ValueError ] , tags : [ ] .}
-
-
-
-
-
-
proc parentOf ( node : NimNode ; child : NimNode ) : InsertionPoint {.... raises : [ ] ,
- tags : [ ] .}
-
-
-Recursively search for an ident node of the given name and return the parent of that node.
-
-
+
+
+
proc newObjectTypeDef ( name : string ; isref : bool = false ) : UnfinishedObjectTypeDef {.
+ compileTime , ... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Creates: root -> type {name} = object insertion -> ...
+
+
-
-
proc parentOf ( node : NimNode ; name : string ) : InsertionPoint {.... raises : [ ] ,
- tags : [ ] .}
-
-
-Recursively search for an ident node of the given name and return the parent of that node.
-
-
-
proc replace ( point : InsertionPoint ; newnode : NimNode ) {.... raises : [ ] , tags : [ ] .}
-
-
-Replace the child
-
-
+
+
+
proc nimRepr ( n : NimNode ) : string {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+
+
+
-
-
proc replaceNodes ( ast : NimNode ) : NimNode {.... raises : [ ] , tags : [ ] .}
-
-Replace NimIdent and NimSym by a fresh ident node
+
+
+
+
proc parentOf ( node : NimNode ; child : NimNode ) : InsertionPoint {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Recursively search for an ident node of the given name and return the parent of that node.
+
+
+
+
+
proc parentOf ( node : NimNode ; name : string ) : InsertionPoint {.... raises : [ ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ Recursively search for an ident node of the given name and return the parent of that node.
+
+
+
+
+
+
+
+
proc replace ( point : InsertionPoint ; newnode : NimNode ) {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Replace the child
+
+
+
+
+
+
+
+
proc replaceNodes ( ast : NimNode ) : NimNode {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Replace NimIdent and NimSym by a fresh ident node
Use with the results of quote do: ... to get ASTs without symbol resolution having been done already.
+
+
+
-
-
+
+
-
-
- Made with Nim. Generated: 2023-03-15 13:20:32 UTC
+
+ Made with Nim. Generated: 2026-01-26 01:59:28 UTC
-
-
+
diff --git a/docs/argparse/macrohelp.idx b/docs/argparse/macrohelp.idx
index a1c4c48..b5fe84c 100644
--- a/docs/argparse/macrohelp.idx
+++ b/docs/argparse/macrohelp.idx
@@ -1,30 +1,38 @@
-UnfinishedObjectTypeDef argparse/macrohelp.html#UnfinishedObjectTypeDef macrohelp: UnfinishedObjectTypeDef
-UnfinishedCase argparse/macrohelp.html#UnfinishedCase macrohelp: UnfinishedCase
-ident argparse/macrohelp.html#ident macrohelp: ident
-newIdentNode argparse/macrohelp.html#newIdentNode macrohelp: newIdentNode
-replaceNodes argparse/macrohelp.html#replaceNodes,NimNode macrohelp: replaceNodes(ast: NimNode): NimNode
-parentOf argparse/macrohelp.html#parentOf,NimNode,string macrohelp: parentOf(node: NimNode; name: string): InsertionPoint
-parentOf argparse/macrohelp.html#parentOf,NimNode,NimNode macrohelp: parentOf(node: NimNode; child: NimNode): InsertionPoint
-getInsertionPoint argparse/macrohelp.html#getInsertionPoint,NimNode,string macrohelp: getInsertionPoint(node: var NimNode; name: string): InsertionPoint
-clear argparse/macrohelp.html#clear,InsertionPoint macrohelp: clear(point: InsertionPoint): int
-replace argparse/macrohelp.html#replace,InsertionPoint,NimNode macrohelp: replace(point: InsertionPoint; newnode: NimNode)
-newObjectTypeDef argparse/macrohelp.html#newObjectTypeDef,string,bool macrohelp: newObjectTypeDef(name: string; isref: bool = false): UnfinishedObjectTypeDef
-addObjectField argparse/macrohelp.html#addObjectField,UnfinishedObjectTypeDef,string,NimNode macrohelp: addObjectField(objtypedef: UnfinishedObjectTypeDef; name: string; kind: NimNode)
-addObjectField argparse/macrohelp.html#addObjectField,UnfinishedObjectTypeDef,string,string,bool macrohelp: addObjectField(objtypedef: UnfinishedObjectTypeDef; name: string; kind: string;\n isref: bool = false)
-newCaseStatement argparse/macrohelp.html#newCaseStatement,NimNode macrohelp: newCaseStatement(key: NimNode): ref UnfinishedCase
-newCaseStatement argparse/macrohelp.html#newCaseStatement,string macrohelp: newCaseStatement(key: string): ref UnfinishedCase
-add argparse/macrohelp.html#add,ref.UnfinishedCase,seq[NimNode],NimNode macrohelp: add(n: ref UnfinishedCase; opt: seq[NimNode]; body: NimNode)
-add argparse/macrohelp.html#add,ref.UnfinishedCase,NimNode,NimNode macrohelp: add(n: ref UnfinishedCase; opt: NimNode; body: NimNode)
-add argparse/macrohelp.html#add,ref.UnfinishedCase,string,NimNode macrohelp: add(n: ref UnfinishedCase; opt: string; body: NimNode)
-add argparse/macrohelp.html#add,ref.UnfinishedCase,seq[string],NimNode macrohelp: add(n: ref UnfinishedCase; opts: seq[string]; body: NimNode)
-add argparse/macrohelp.html#add,ref.UnfinishedCase,int,NimNode macrohelp: add(n: ref UnfinishedCase; opt: int; body: NimNode)
-hasElse argparse/macrohelp.html#hasElse,ref.UnfinishedCase macrohelp: hasElse(n: ref UnfinishedCase): bool
-addElse argparse/macrohelp.html#addElse,ref.UnfinishedCase,NimNode macrohelp: addElse(n: ref UnfinishedCase; body: NimNode)
-isValid argparse/macrohelp.html#isValid,ref.UnfinishedCase macrohelp: isValid(n: ref UnfinishedCase): bool
-finalize argparse/macrohelp.html#finalize,ref.UnfinishedCase macrohelp: finalize(n: ref UnfinishedCase): NimNode
-newIfStatement argparse/macrohelp.html#newIfStatement macrohelp: newIfStatement(): ref UnfinishedIf
-add argparse/macrohelp.html#add,ref.UnfinishedIf,NimNode,NimNode macrohelp: add(n: ref UnfinishedIf; cond: NimNode; body: NimNode)
-addElse argparse/macrohelp.html#addElse,ref.UnfinishedIf,NimNode macrohelp: addElse(n: ref UnfinishedIf; body: NimNode)
-isValid argparse/macrohelp.html#isValid,ref.UnfinishedIf macrohelp: isValid(n: ref UnfinishedIf): bool
-finalize argparse/macrohelp.html#finalize,ref.UnfinishedIf macrohelp: finalize(n: ref UnfinishedIf): NimNode
-nimRepr argparse/macrohelp.html#nimRepr,NimNode macrohelp: nimRepr(n: NimNode): string
+nimTitle macrohelp argparse/macrohelp.html module argparse/macrohelp 0
+nim UnfinishedObjectTypeDef argparse/macrohelp.html#UnfinishedObjectTypeDef object UnfinishedObjectTypeDef 7
+nim UnfinishedCase argparse/macrohelp.html#UnfinishedCase object UnfinishedCase 11
+nim ident argparse/macrohelp.html#ident const ident 24
+nim newIdentNode argparse/macrohelp.html#newIdentNode const newIdentNode 25
+nim replaceNodes argparse/macrohelp.html#replaceNodes,NimNode proc replaceNodes(ast: NimNode): NimNode 27
+nim parentOf argparse/macrohelp.html#parentOf,NimNode,string proc parentOf(node: NimNode; name: string): InsertionPoint 54
+nim parentOf argparse/macrohelp.html#parentOf,NimNode,NimNode proc parentOf(node: NimNode; child: NimNode): InsertionPoint 67
+nim getInsertionPoint argparse/macrohelp.html#getInsertionPoint,NimNode,string proc getInsertionPoint(node: var NimNode; name: string): InsertionPoint 80
+nim clear argparse/macrohelp.html#clear,InsertionPoint proc clear(point: InsertionPoint): int 84
+nim replace argparse/macrohelp.html#replace,InsertionPoint,NimNode proc replace(point: InsertionPoint; newnode: NimNode) 93
+nim newObjectTypeDef argparse/macrohelp.html#newObjectTypeDef,string,bool proc newObjectTypeDef(name: string; isref: bool = false): UnfinishedObjectTypeDef 98
+nim addObjectField argparse/macrohelp.html#addObjectField,UnfinishedObjectTypeDef,string,NimNode proc addObjectField(objtypedef: UnfinishedObjectTypeDef; name: string; kind: NimNode) 122
+nim addObjectField argparse/macrohelp.html#addObjectField,UnfinishedObjectTypeDef,string,string,bool proc addObjectField(objtypedef: UnfinishedObjectTypeDef; name: string; kind: string;\n isref: bool = false) 133
+nim newCaseStatement argparse/macrohelp.html#newCaseStatement,NimNode proc newCaseStatement(key: NimNode): ref UnfinishedCase 143
+nim newCaseStatement argparse/macrohelp.html#newCaseStatement,string proc newCaseStatement(key: string): ref UnfinishedCase 150
+nim add argparse/macrohelp.html#add,ref.UnfinishedCase,seq[NimNode],NimNode proc add(n: ref UnfinishedCase; opt: seq[NimNode]; body: NimNode) 153
+nim add argparse/macrohelp.html#add,ref.UnfinishedCase,NimNode,NimNode proc add(n: ref UnfinishedCase; opt: NimNode; body: NimNode) 167
+nim add argparse/macrohelp.html#add,ref.UnfinishedCase,string,NimNode proc add(n: ref UnfinishedCase; opt: string; body: NimNode) 171
+nim add argparse/macrohelp.html#add,ref.UnfinishedCase,seq[string],NimNode proc add(n: ref UnfinishedCase; opts: seq[string]; body: NimNode) 179
+nim add argparse/macrohelp.html#add,ref.UnfinishedCase,int,NimNode proc add(n: ref UnfinishedCase; opt: int; body: NimNode) 187
+nim hasElse argparse/macrohelp.html#hasElse,ref.UnfinishedCase proc hasElse(n: ref UnfinishedCase): bool 191
+nim addElse argparse/macrohelp.html#addElse,ref.UnfinishedCase,NimNode proc addElse(n: ref UnfinishedCase; body: NimNode) 194
+nim isValid argparse/macrohelp.html#isValid,ref.UnfinishedCase proc isValid(n: ref UnfinishedCase): bool 198
+nim finalize argparse/macrohelp.html#finalize,ref.UnfinishedCase proc finalize(n: ref UnfinishedCase): NimNode 201
+nim newIfStatement argparse/macrohelp.html#newIfStatement proc newIfStatement(): ref UnfinishedIf 215
+nim add argparse/macrohelp.html#add,ref.UnfinishedIf,NimNode,NimNode proc add(n: ref UnfinishedIf; cond: NimNode; body: NimNode) 220
+nim addElse argparse/macrohelp.html#addElse,ref.UnfinishedIf,NimNode proc addElse(n: ref UnfinishedIf; body: NimNode) 230
+nim isValid argparse/macrohelp.html#isValid,ref.UnfinishedIf proc isValid(n: ref UnfinishedIf): bool 234
+nim finalize argparse/macrohelp.html#finalize,ref.UnfinishedIf proc finalize(n: ref UnfinishedIf): NimNode 237
+nim nimRepr argparse/macrohelp.html#nimRepr,NimNode proc nimRepr(n: NimNode): string 246
+nimgrp finalize argparse/macrohelp.html#finalize-procs-all proc 201
+nimgrp isvalid argparse/macrohelp.html#isValid-procs-all proc 198
+nimgrp addobjectfield argparse/macrohelp.html#addObjectField-procs-all proc 122
+nimgrp parentof argparse/macrohelp.html#parentOf-procs-all proc 54
+nimgrp newcasestatement argparse/macrohelp.html#newCaseStatement-procs-all proc 143
+nimgrp add argparse/macrohelp.html#add-procs-all proc 153
+nimgrp addelse argparse/macrohelp.html#addElse-procs-all proc 194
diff --git a/docs/argparse/nimdoc.out.css b/docs/argparse/nimdoc.out.css
deleted file mode 100644
index 4ee73ea..0000000
--- a/docs/argparse/nimdoc.out.css
+++ /dev/null
@@ -1,891 +0,0 @@
-/*
-Stylesheet for use with Docutils/rst2html.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-
-Modified from Chad Skeeters' rst2html-style
-https://bitbucket.org/cskeeters/rst2html-style/
-
-Modified by Boyd Greenfield and narimiran
-*/
-
-:root {
- --primary-background: #fff;
- --secondary-background: ghostwhite;
- --third-background: #e8e8e8;
- --border: #dde;
- --text: #222;
- --anchor: #07b;
- --anchor-focus: #607c9f;
- --input-focus: #1fa0eb;
- --strong: #3c3c3c;
- --hint: #9A9A9A;
- --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAAA9CAYAAADCt9ebAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC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4A9CcviqM0e9H80HdUxCpwIa4McygA/GfgAcCJqmGKKXUixupEv7nHsLc2agWNQ0d9OzC+PHNHIo1XeLCoe8kkqXiUtwKFoWXoEKqk3BpWLaC8cXsV8HT1J+tFTZKvn+DMqFZi1knvtyKg1O2lBHADcCVxEedNSAP4HJcsr0NNWHVUAAAAASUVORK5CYII=");
-
- --keyword: #5e8f60;
- --identifier: #222;
- --comment: #484a86;
- --operator: #155da4;
- --punctuation: black;
- --other: black;
- --escapeSequence: #c4891b;
- --number: #252dbe;
- --literal: #a4255b;
- --raw-data: #a4255b;
-}
-
-[data-theme="dark"] {
- --primary-background: #171921;
- --secondary-background: #1e202a;
- --third-background: #2b2e3b;
- --border: #0e1014;
- --text: #fff;
- --anchor: #8be9fd;
- --anchor-focus: #8be9fd;
- --input-focus: #8be9fd;
- --strong: #bd93f9;
- --hint: #7A7C85;
- --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAABMCAYAAABOBlMuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGh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#f8f8f2;
- --comment: #6272a4;
- --operator: #ff79c6;
- --punctuation: #f8f8f2;
- --other: #f8f8f2;
- --escapeSequence: #bd93f9;
- --number: #bd93f9;
- --literal: #f1fa8c;
- --raw-data: #8be9fd;
-}
-
-.theme-switch-wrapper {
- display: flex;
- align-items: center;
-
- em {
- margin-left: 10px;
- font-size: 1rem;
- }
-}
-.theme-switch {
- display: inline-block;
- height: 22px;
- position: relative;
- width: 50px;
-}
-
-.theme-switch input {
- display: none;
-}
-
-.slider {
- background-color: #ccc;
- bottom: 0;
- cursor: pointer;
- left: 0;
- position: absolute;
- right: 0;
- top: 0;
- transition: .4s;
-}
-
-.slider:before {
- background-color: #fff;
- bottom: 4px;
- content: "";
- height: 13px;
- left: 4px;
- position: absolute;
- transition: .4s;
- width: 13px;
-}
-
-input:checked + .slider {
- background-color: #66bb6a;
-}
-
-input:checked + .slider:before {
- transform: translateX(26px);
-}
-
-.slider.round {
- border-radius: 17px;
-}
-
-.slider.round:before {
- border-radius: 50%;
-}
-
-html {
- font-size: 100%;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%; }
-
-body {
- font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
- font-weight: 400;
- font-size: 1.125em;
- line-height: 1.5;
- color: var(--text);
- background-color: var(--primary-background); }
-
-/* Skeleton grid */
-.container {
- position: relative;
- width: 100%;
- max-width: 1050px;
- margin: 0 auto;
- padding: 0;
- box-sizing: border-box; }
-
-.column,
-.columns {
- width: 100%;
- float: left;
- box-sizing: border-box;
- margin-left: 1%;
-}
-
-.column:first-child,
-.columns:first-child {
- margin-left: 0; }
-
-.three.columns {
- width: 19%; }
-
-.nine.columns {
- width: 80.0%; }
-
-.twelve.columns {
- width: 100%;
- margin-left: 0; }
-
-@media screen and (max-width: 860px) {
- .three.columns {
- display: none;
- }
- .nine.columns {
- width: 98.0%;
- }
- body {
- font-size: 1em;
- line-height: 1.35;
- }
-}
-
-cite {
- font-style: italic !important; }
-
-
-/* Nim search input */
-div#searchInputDiv {
- margin-bottom: 1em;
-}
-input#searchInput {
- width: 80%;
-}
-
-/*
- * Some custom formatting for input forms.
- * This also fixes input form colors on Firefox with a dark system theme on Linux.
- */
-input {
- -moz-appearance: none;
- background-color: var(--secondary-background);
- color: var(--text);
- border: 1px solid var(--border);
- font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
- font-size: 0.9em;
- padding: 6px;
-}
-
-input:focus {
- border: 1px solid var(--input-focus);
- box-shadow: 0 0 3px var(--input-focus);
-}
-
-select {
- -moz-appearance: none;
- background-color: var(--secondary-background);
- color: var(--text);
- border: 1px solid var(--border);
- font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
- font-size: 0.9em;
- padding: 6px;
-}
-
-select:focus {
- border: 1px solid var(--input-focus);
- box-shadow: 0 0 3px var(--input-focus);
-}
-
-/* Docgen styles */
-/* Links */
-a {
- color: var(--anchor);
- text-decoration: none;
-}
-
-a span.Identifier {
- text-decoration: underline;
- text-decoration-color: #aab;
-}
-
-a.reference-toplevel {
- font-weight: bold;
-}
-
-a.toc-backref {
- text-decoration: none;
- color: var(--text); }
-
-a.link-seesrc {
- color: #607c9f;
- font-size: 0.9em;
- font-style: italic; }
-
-a:hover,
-a:focus {
- color: var(--anchor-focus);
- text-decoration: underline; }
-
-a:hover span.Identifier {
- color: var(--anchor);
-}
-
-
-sub,
-sup {
- position: relative;
- font-size: 75%;
- line-height: 0;
- vertical-align: baseline; }
-
-sup {
- top: -0.5em; }
-
-sub {
- bottom: -0.25em; }
-
-img {
- width: auto;
- height: auto;
- max-width: 100%;
- vertical-align: middle;
- border: 0;
- -ms-interpolation-mode: bicubic; }
-
-@media print {
- * {
- color: black !important;
- text-shadow: none !important;
- background: transparent !important;
- box-shadow: none !important; }
-
- a,
- a:visited {
- text-decoration: underline; }
-
- a[href]:after {
- content: " (" attr(href) ")"; }
-
- abbr[title]:after {
- content: " (" attr(title) ")"; }
-
- .ir a:after,
- a[href^="javascript:"]:after,
- a[href^="#"]:after {
- content: ""; }
-
- pre,
- blockquote {
- border: 1px solid #999;
- page-break-inside: avoid; }
-
- thead {
- display: table-header-group; }
-
- tr,
- img {
- page-break-inside: avoid; }
-
- img {
- max-width: 100% !important; }
-
- @page {
- margin: 0.5cm; }
-
- h1 {
- page-break-before: always; }
-
- h1.title {
- page-break-before: avoid; }
-
- p,
- h2,
- h3 {
- orphans: 3;
- widows: 3; }
-
- h2,
- h3 {
- page-break-after: avoid; }
-}
-
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-small {
- font-size: 85%; }
-
-strong {
- font-weight: 600;
- font-size: 0.95em;
- color: var(--strong);
-}
-
-em {
- font-style: italic; }
-
-h1 {
- font-size: 1.8em;
- font-weight: 400;
- padding-bottom: .25em;
- border-bottom: 6px solid var(--third-background);
- margin-top: 2.5em;
- margin-bottom: 1em;
- line-height: 1.2em; }
-
-h1.title {
- padding-bottom: 1em;
- border-bottom: 0px;
- font-size: 2.5em;
- text-align: center;
- font-weight: 900;
- margin-top: 0.75em;
- margin-bottom: 0em;
-}
-
-h2 {
- font-size: 1.3em;
- margin-top: 2em; }
-
-h2.subtitle {
- text-align: center; }
-
-h3 {
- font-size: 1.125em;
- font-style: italic;
- margin-top: 1.5em; }
-
-h4 {
- font-size: 1.125em;
- margin-top: 1em; }
-
-h5 {
- font-size: 1.125em;
- margin-top: 0.75em; }
-
-h6 {
- font-size: 1.1em; }
-
-
-ul,
-ol {
- padding: 0;
- margin-top: 0.5em;
- margin-left: 0.75em; }
-
-ul ul,
-ul ol,
-ol ol,
-ol ul {
- margin-bottom: 0;
- margin-left: 1.25em; }
-
-li {
- list-style-type: circle;
-}
-
-ul.simple-boot li {
- list-style-type: none;
- margin-left: 0em;
- margin-bottom: 0.5em;
-}
-
-ol.simple > li, ul.simple > li {
- margin-bottom: 0.25em;
- margin-left: 0.4em }
-
-ul.simple.simple-toc > li {
- margin-top: 1em;
-}
-
-ul.simple-toc {
- list-style: none;
- font-size: 0.9em;
- margin-left: -0.3em;
- margin-top: 1em; }
-
-ul.simple-toc > li {
- list-style-type: none;
-}
-
-ul.simple-toc-section {
- list-style-type: circle;
- margin-left: 1em;
- color: #6c9aae; }
-
-
-ol.arabic {
- list-style: decimal; }
-
-ol.loweralpha {
- list-style: lower-alpha; }
-
-ol.upperalpha {
- list-style: upper-alpha; }
-
-ol.lowerroman {
- list-style: lower-roman; }
-
-ol.upperroman {
- list-style: upper-roman; }
-
-ul.auto-toc {
- list-style-type: none; }
-
-
-dl {
- margin-bottom: 1.5em; }
-
-dt {
- margin-bottom: -0.5em;
- margin-left: 0.0em; }
-
-dd {
- margin-left: 2.0em;
- margin-bottom: 3.0em;
- margin-top: 0.5em; }
-
-
-hr {
- margin: 2em 0;
- border: 0;
- border-top: 1px solid #aaa; }
-
-blockquote {
- font-size: 0.9em;
- font-style: italic;
- padding-left: 0.5em;
- margin-left: 0;
- border-left: 5px solid #bbc;
-}
-
-.pre {
- font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
- font-weight: 500;
- font-size: 0.85em;
- color: var(--text);
- background-color: var(--third-background);
- padding-left: 3px;
- padding-right: 3px;
- border-radius: 4px;
-}
-
-pre {
- font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
- color: var(--text);
- font-weight: 500;
- display: inline-block;
- box-sizing: border-box;
- min-width: 100%;
- padding: 0.5em;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- font-size: 0.85em;
- white-space: pre !important;
- overflow-y: hidden;
- overflow-x: visible;
- background-color: var(--secondary-background);
- border: 1px solid var(--border);
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px; }
-
-.pre-scrollable {
- max-height: 340px;
- overflow-y: scroll; }
-
-
-/* Nim line-numbered tables */
-.line-nums-table {
- width: 100%;
- table-layout: fixed; }
-
-table.line-nums-table {
- border-radius: 4px;
- border: 1px solid #cccccc;
- background-color: ghostwhite;
- border-collapse: separate;
- margin-top: 15px;
- margin-bottom: 25px; }
-
-.line-nums-table tbody {
- border: none; }
-
-.line-nums-table td pre {
- border: none;
- background-color: transparent; }
-
-.line-nums-table td.blob-line-nums {
- width: 28px; }
-
-.line-nums-table td.blob-line-nums pre {
- color: #b0b0b0;
- -webkit-filter: opacity(75%);
- text-align: right;
- border-color: transparent;
- background-color: transparent;
- padding-left: 0px;
- margin-left: 0px;
- padding-right: 0px;
- margin-right: 0px; }
-
-
-table {
- max-width: 100%;
- background-color: transparent;
- margin-top: 0.5em;
- margin-bottom: 1.5em;
- border-collapse: collapse;
- border-color: var(--third-background);
- border-spacing: 0;
- font-size: 0.9em;
-}
-
-table th, table td {
- padding: 0px 0.5em 0px;
- border-color: var(--third-background);
-}
-
-table th {
- background-color: var(--third-background);
- border-color: var(--third-background);
- font-weight: bold; }
-
-table th.docinfo-name {
- background-color: transparent;
-}
-
-table tr:hover {
- background-color: var(--third-background); }
-
-
-/* rst2html default used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
- border: 0; }
-
-table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 !important; }
-
-.first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 !important; }
-
-.last, .with-subtitle {
- margin-bottom: 0 !important; }
-
-.hidden {
- display: none; }
-
-blockquote.epigraph {
- margin: 2em 5em; }
-
-dl.docutils dd {
- margin-bottom: 0.5em; }
-
-object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
- overflow: hidden; }
-
-
-div.figure {
- margin-left: 2em;
- margin-right: 2em; }
-
-div.footer, div.header {
- clear: both;
- text-align: center;
- color: #666;
- font-size: smaller; }
-
-div.footer {
- padding-top: 5em;
-}
-
-div.line-block {
- display: block;
- margin-top: 1em;
- margin-bottom: 1em; }
-
-div.line-block div.line-block {
- margin-top: 0;
- margin-bottom: 0;
- margin-left: 1.5em; }
-
-div.topic {
- margin: 2em; }
-
-div.search_results {
- background-color: antiquewhite;
- margin: 3em;
- padding: 1em;
- border: 1px solid #4d4d4d;
-}
-
-div#global-links ul {
- margin-left: 0;
- list-style-type: none;
-}
-
-div#global-links > simple-boot {
- margin-left: 3em;
-}
-
-hr.docutils {
- width: 75%; }
-
-img.align-left, .figure.align-left, object.align-left {
- clear: left;
- float: left;
- margin-right: 1em; }
-
-img.align-right, .figure.align-right, object.align-right {
- clear: right;
- float: right;
- margin-left: 1em; }
-
-img.align-center, .figure.align-center, object.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto; }
-
-.align-left {
- text-align: left; }
-
-.align-center {
- clear: both;
- text-align: center; }
-
-.align-right {
- text-align: right; }
-
-/* reset inner alignment in figures */
-div.align-right {
- text-align: inherit; }
-
-p.attribution {
- text-align: right;
- margin-left: 50%; }
-
-p.caption {
- font-style: italic; }
-
-p.credits {
- font-style: italic;
- font-size: smaller; }
-
-p.label {
- white-space: nowrap; }
-
-p.rubric {
- font-weight: bold;
- font-size: larger;
- color: maroon;
- text-align: center; }
-
-p.topic-title {
- font-weight: bold; }
-
-pre.address {
- margin-bottom: 0;
- margin-top: 0;
- font: inherit; }
-
-pre.literal-block, pre.doctest-block, pre.math, pre.code {
- margin-left: 2em;
- margin-right: 2em; }
-
-pre.code .ln {
- color: grey; }
-
-/* line numbers */
-pre.code, code {
- background-color: #eeeeee; }
-
-pre.code .comment, code .comment {
- color: #5c6576; }
-
-pre.code .keyword, code .keyword {
- color: #3B0D06;
- font-weight: bold; }
-
-pre.code .literal.string, code .literal.string {
- color: #0c5404; }
-
-pre.code .name.builtin, code .name.builtin {
- color: #352b84; }
-
-pre.code .deleted, code .deleted {
- background-color: #DEB0A1; }
-
-pre.code .inserted, code .inserted {
- background-color: #A3D289; }
-
-span.classifier {
- font-style: oblique; }
-
-span.classifier-delimiter {
- font-weight: bold; }
-
-span.option {
- white-space: nowrap; }
-
-span.problematic {
- color: #b30000; }
-
-span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80%; }
-
-span.DecNumber {
- color: var(--number); }
-
-span.BinNumber {
- color: var(--number); }
-
-span.HexNumber {
- color: var(--number); }
-
-span.OctNumber {
- color: var(--number); }
-
-span.FloatNumber {
- color: var(--number); }
-
-span.Identifier {
- color: var(--identifier); }
-
-span.Keyword {
- font-weight: 600;
- color: var(--keyword); }
-
-span.StringLit {
- color: var(--literal); }
-
-span.LongStringLit {
- color: var(--literal); }
-
-span.CharLit {
- color: var(--literal); }
-
-span.EscapeSequence {
- color: var(--escapeSequence); }
-
-span.Operator {
- color: var(--operator); }
-
-span.Punctuation {
- color: var(--punctuation); }
-
-span.Comment, span.LongComment {
- font-style: italic;
- font-weight: 400;
- color: var(--comment); }
-
-span.RegularExpression {
- color: darkviolet; }
-
-span.TagStart {
- color: darkviolet; }
-
-span.TagEnd {
- color: darkviolet; }
-
-span.Key {
- color: #252dbe; }
-
-span.Value {
- color: #252dbe; }
-
-span.RawData {
- color: var(--raw-data); }
-
-span.Assembler {
- color: #252dbe; }
-
-span.Preprocessor {
- color: #252dbe; }
-
-span.Directive {
- color: #252dbe; }
-
-span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference,
-span.Other {
- color: var(--other); }
-
-/* Pop type, const, proc, and iterator defs in nim def blocks */
-dt pre > span.Identifier, dt pre > span.Operator {
- color: var(--identifier);
- font-weight: 700; }
-
-dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
-dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier {
- color: var(--identifier);
- font-weight: inherit; }
-
-/* Nim sprite for the footer (taken from main page favicon) */
-.nim-sprite {
- display: inline-block;
- width: 51px;
- height: 14px;
- background-position: 0 0;
- background-size: 51px 14px;
- -webkit-filter: opacity(50%);
- background-repeat: no-repeat;
- background-image: var(--nim-sprite-base64);
- margin-bottom: 5px; }
-
-span.pragmadots {
- /* Position: relative frees us up to make the dots
- look really nice without fucking up the layout and
- causing bulging in the parent container */
- position: relative;
- /* 1px down looks slightly nicer */
- top: 1px;
- padding: 2px;
- background-color: var(--third-background);
- border-radius: 4px;
- margin: 0 2px;
- cursor: pointer;
- font-size: 0.8em;
-}
-
-span.pragmadots:hover {
- background-color: var(--hint);
-}
-span.pragmawrap {
- display: none;
-}
-
-span.attachedType {
- display: none;
- visibility: hidden;
-}
\ No newline at end of file
diff --git a/docs/argparse/shellcompletion/fish.html b/docs/argparse/shellcompletion/fish.html
new file mode 100644
index 0000000..dc9bdab
--- /dev/null
+++ b/docs/argparse/shellcompletion/fish.html
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+
argparse/shellcompletion/fish
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
argparse/shellcompletion/fish
+
+
+
+ Theme:
+
+ 🌗 Match OS
+ 🌑 Dark
+ 🌕 Light
+
+
+
+
+ Search:
+
+
+ Group by:
+
+ Section
+ Type
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
proc allChildren ( builder : Builder ) : seq [ Builder ] {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Return all the descendents of this builder
+
+
+
+
+
+
+
+
proc getFishShellCompletionsTemplate ( b : Builder ; allSubcommandsPre : Option [
+ HashSet [ string ] ] = none [ HashSet [ string ] ] ( ) ) : seq [ string ] {.compiletime ,
+ ... raises : [ ValueError ] , tags : [ ] , forbids : [ ] .}
+
+
+ Get the completion definitions for the target shell
+allSubcommands can be passed in to avoid recomputing it for subcommands
+Return a list of completion commands for fish shell sans the command itself
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Made with Nim. Generated: 2026-01-26 01:59:28 UTC
+
+
+
+
+
+
diff --git a/docs/argparse/shellcompletion/fish.idx b/docs/argparse/shellcompletion/fish.idx
new file mode 100644
index 0000000..36f3e48
--- /dev/null
+++ b/docs/argparse/shellcompletion/fish.idx
@@ -0,0 +1,4 @@
+nimTitle fish argparse/shellcompletion/fish.html module argparse/shellcompletion/fish 0
+nim COMPLETION_HEADER_FISH argparse/shellcompletion/fish.html#COMPLETION_HEADER_FISH const COMPLETION_HEADER_FISH 4
+nim allChildren argparse/shellcompletion/fish.html#allChildren,Builder proc allChildren(builder: Builder): seq[Builder] 90
+nim getFishShellCompletionsTemplate argparse/shellcompletion/fish.html#getFishShellCompletionsTemplate,Builder,Option[HashSet[string]] proc getFishShellCompletionsTemplate(b: Builder; allSubcommandsPre: Option[\n HashSet[string]] = none[HashSet[string]]()): seq[string] 96
diff --git a/docs/argparse/shellcompletion/shellcompletion.html b/docs/argparse/shellcompletion/shellcompletion.html
new file mode 100644
index 0000000..8352115
--- /dev/null
+++ b/docs/argparse/shellcompletion/shellcompletion.html
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+
+
argparse/shellcompletion/shellcompletion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
argparse/shellcompletion/shellcompletion
+
+
+
+ Theme:
+
+ 🌗 Match OS
+ 🌑 Dark
+ 🌕 Light
+
+
+
+
+ Search:
+
+
+ Group by:
+
+ Section
+ Type
+
+
+
+
+
+
+
+
+
+
+
+
Hooks added to argparse/backend module hotwire, triggers short circuit on completion option
+shortcircuit, triggered by standart mechanism on completion flag
+
+
+Handler for shortcircuit generated by getShortCircuitBehaviourImpl Process env SHELL to derive target shell
+Print completions
+
+
+Implementation for completion printing in module specific to shell
+
+
+
completion generation occurs at compiletime and persists to runtime
+const array indexed by ShellCompletionKind containing completions
+lookup at runtime based on user input
+
+
+
Fish completions are declarative, but other shells are procedural, consequentially its not easy to abstract completion generation to a unified interface thus each shell should have its own module for handling its own specifics
+
+
+
+
+
+
+
COMPLETION_FLAG = ( varname : "printCompletions" , hidden : false ,
+ help : "Print shell completion definitions for env $SHELL" ,
+ env : "" , kind : ArgFlag , flagShort : "-c" , flagLong : "" ,
+ flagMultiple : false , shortCircuit : true , optShort : "" ,
+ optLong : "" , optMultiple : false ,
+ optDefault : ( val : "" , has : false ) , optChoices : [ ] ,
+ optCompletionsGenerator : [ "" ] , optRequired : false , nargs : 0 ,
+ argDefault : ( val : "" , has : false ) ,
+ argCompletionsGenerator : [ "" ] )
+
+
+
+
+
+
+
+
+
+
+
+
COMPLETION_OPT = ( varname : "shell" , hidden : false ,
+ help : "Print shell completion definitions for given shell" ,
+ env : "SHELL" , kind : ArgOption , flagShort : "" , flagLong : "" ,
+ flagMultiple : false , shortCircuit : false , optShort : "" ,
+ optLong : "--completionDefinitions" , optMultiple : false ,
+ optDefault : ( val : "" , has : false ) , optChoices : [ "fish" ] ,
+ optCompletionsGenerator : [ "" ] , optRequired : false , nargs : 0 ,
+ argDefault : ( val : "" , has : false ) ,
+ argCompletionsGenerator : [ "" ] )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
proc deriveShellFromEnvVar ( envVar : string ) : string {.... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+
+
+
+
+
+
+
+
+
proc getShortCircuitBehaviourImpl ( b : Builder ) : NimNode {.... raises : [ ValueError ] ,
+ tags : [ ] , forbids : [ ] .}
+
+
+ AST implementing behaviour to enact on a shortcircuit for completions
+Executed at runtime in the context of parse() declared at parseProcDef_
+Called when user passed completions flag or option. Where they passed the flag pull the shell from env var SHELL. Where they passed the option use that. Where they passed the flag and the option use the option.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Made with Nim. Generated: 2026-01-26 01:59:28 UTC
+
+
+
+
+
+
diff --git a/docs/argparse/shellcompletion/shellcompletion.idx b/docs/argparse/shellcompletion/shellcompletion.idx
new file mode 100644
index 0000000..137275c
--- /dev/null
+++ b/docs/argparse/shellcompletion/shellcompletion.idx
@@ -0,0 +1,17 @@
+nimTitle shellcompletion argparse/shellcompletion/shellcompletion.html module argparse/shellcompletion/shellcompletion 0
+nim COMPLETION_OPT_VARNAME argparse/shellcompletion/shellcompletion.html#COMPLETION_OPT_VARNAME const COMPLETION_OPT_VARNAME 27
+nim COMPLETION_FLAG_VARNAME argparse/shellcompletion/shellcompletion.html#COMPLETION_FLAG_VARNAME const COMPLETION_FLAG_VARNAME 28
+nim COMPLETION_SHELLS argparse/shellcompletion/shellcompletion.html#COMPLETION_SHELLS const COMPLETION_SHELLS 29
+nim COMPLETION_LONG_FLAG argparse/shellcompletion/shellcompletion.html#COMPLETION_LONG_FLAG const COMPLETION_LONG_FLAG 30
+nim COMPLETION_LONG_HELP argparse/shellcompletion/shellcompletion.html#COMPLETION_LONG_HELP const COMPLETION_LONG_HELP 31
+nim COMPLETION_SHORT_FLAG argparse/shellcompletion/shellcompletion.html#COMPLETION_SHORT_FLAG const COMPLETION_SHORT_FLAG 33
+nim COMPLETION_SHORT_HELP argparse/shellcompletion/shellcompletion.html#COMPLETION_SHORT_HELP const COMPLETION_SHORT_HELP 34
+nim COMPLETION_HEADER argparse/shellcompletion/shellcompletion.html#COMPLETION_HEADER const COMPLETION_HEADER 36
+nim COMPLETION_OPT argparse/shellcompletion/shellcompletion.html#COMPLETION_OPT const COMPLETION_OPT 37
+nim COMPLETION_FLAG argparse/shellcompletion/shellcompletion.html#COMPLETION_FLAG const COMPLETION_FLAG 46
+nim deriveShellFromEnvVar argparse/shellcompletion/shellcompletion.html#deriveShellFromEnvVar,string proc deriveShellFromEnvVar(envVar: string): string 54
+nim getShortCircuitBehaviourImpl argparse/shellcompletion/shellcompletion.html#getShortCircuitBehaviourImpl,Builder proc getShortCircuitBehaviourImpl(b: Builder): NimNode 121
+heading Architecture argparse/shellcompletion/shellcompletion.html#architecture Architecture 0
+heading Compiletime argparse/shellcompletion/shellcompletion.html#architecture-compiletime Compiletime 0
+heading Further Detail argparse/shellcompletion/shellcompletion.html#compiletime-further-detail Further Detail 0
+heading Notes argparse/shellcompletion/shellcompletion.html#notes Notes 0
diff --git a/docs/argparse/types.html b/docs/argparse/types.html
new file mode 100644
index 0000000..6c75a0b
--- /dev/null
+++ b/docs/argparse/types.html
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+
+
argparse/types
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
argparse/types
+
+
+
+ Theme:
+
+ 🌗 Match OS
+ 🌑 Dark
+ 🌕 Light
+
+
+
+
+ Search:
+
+
+ Group by:
+
+ Section
+ Type
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
BuilderObj {.acyclic .} = object
+ name * : string
+
+ symbol * : string
+
+
+ components * : seq [ Component ]
+ help * : string
+ groupName * : string
+ children * : seq [ Builder ]
+ parent * : Option [ Builder ]
+ runProcBodies * : seq [ NimNode ]
+
+
+ A compile-time object used to accumulate parser options before building the parser
+
+
+
+
+
Component = object
+ varname * : string
+ hidden * : bool
+ help * : string
+ env * : string
+ case kind * : ComponentKind
+ of ArgFlag :
+ flagShort * : string
+ flagLong * : string
+ flagMultiple * : bool
+ shortCircuit * : bool
+ of ArgOption :
+ optShort * : string
+ optLong * : string
+ optMultiple * : bool
+ optDefault * : Option [ string ]
+ optChoices * : seq [ string ]
+ optCompletionsGenerator * : array [ ShellCompletionKind , string ]
+ optRequired * : bool
+ of ArgArgument :
+ nargs * : int
+ argDefault * : Option [ string ]
+ argCompletionsGenerator * : array [ ShellCompletionKind , string ]
+
+
+
+
+
+
+
+
ComponentKind = enum
+ ArgFlag , ArgOption , ArgArgument
+
+
+
+
+
+
+
+
+
ShortCircuit = object of CatchableError
+ flag * : string
+ help * : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Made with Nim. Generated: 2026-01-26 01:59:28 UTC
+
+
+
+
+
+
diff --git a/docs/argparse/types.idx b/docs/argparse/types.idx
new file mode 100644
index 0000000..e617eac
--- /dev/null
+++ b/docs/argparse/types.idx
@@ -0,0 +1,12 @@
+nimTitle types argparse/types.html module argparse/types 0
+nim UsageError argparse/types.html#UsageError object UsageError 3
+nim ShortCircuit argparse/types.html#ShortCircuit object ShortCircuit 5
+nim sckFish argparse/types.html#sckFish ShellCompletionKind.sckFish 9
+nim ShellCompletionKind argparse/types.html#ShellCompletionKind enum ShellCompletionKind 9
+nim ArgFlag argparse/types.html#ArgFlag ComponentKind.ArgFlag 14
+nim ArgOption argparse/types.html#ArgOption ComponentKind.ArgOption 14
+nim ArgArgument argparse/types.html#ArgArgument ComponentKind.ArgArgument 14
+nim ComponentKind argparse/types.html#ComponentKind enum ComponentKind 14
+nim Component argparse/types.html#Component object Component 19
+nim Builder argparse/types.html#Builder type Builder 43
+nim BuilderObj argparse/types.html#BuilderObj object BuilderObj 44
diff --git a/docs/argparse/util.html b/docs/argparse/util.html
new file mode 100644
index 0000000..c063d8b
--- /dev/null
+++ b/docs/argparse/util.html
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
argparse/util
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
argparse/util
+
+
+
+ Theme:
+
+ 🌗 Match OS
+ 🌑 Dark
+ 🌕 Light
+
+
+
+
+ Search:
+
+
+ Group by:
+
+ Section
+ Type
+
+
+
+
+
+
+
+
+
+
Utilities used by multiple modules.
Avoids circular dependencies.
+Better module cohesion, all logic within more closely aligned to a purpose
+
+
+
+
+
+
+
+
+
proc getProgNameAst ( b : Builder ) : NimNode {.compiletime , ... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Get the program name for help text and completions
+if b . name == "": getAppFilename().extractFilename() else: b . name
+
+
+
+
+
+
+
+
+
proc getRootBuilder ( b : Builder ) : Builder {.compiletime , ... raises : [ ] , tags : [ ] ,
+ forbids : [ ] .}
+
+
+ Get the root builder for this builder
+
+
+
+
+
+
+
+
proc parserIdent ( b : Builder ) : NimNode {.... raises : [ ] , tags : [ ] , forbids : [ ] .}
+
+
+ Name of the parser type for this Builder
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Made with Nim. Generated: 2026-01-26 01:59:28 UTC
+
+
+
+
+
+
diff --git a/docs/argparse/util.idx b/docs/argparse/util.idx
new file mode 100644
index 0000000..c92d6ee
--- /dev/null
+++ b/docs/argparse/util.idx
@@ -0,0 +1,4 @@
+nimTitle util argparse/util.html module argparse/util 0
+nim getProgNameAst argparse/util.html#getProgNameAst,Builder proc getProgNameAst(b: Builder): NimNode 9
+nim parserIdent argparse/util.html#parserIdent,Builder proc parserIdent(b: Builder): NimNode 18
+nim getRootBuilder argparse/util.html#getRootBuilder,Builder proc getRootBuilder(b: Builder): Builder 23
diff --git a/docs/dochack.js b/docs/dochack.js
index fba0b5c..ab2e29b 100644
--- a/docs/dochack.js
+++ b/docs/dochack.js
@@ -1,810 +1,59 @@
-/* Generated by the Nim Compiler v1.6.10 */
+/* Generated by the Nim Compiler v2.2.6 */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
-var NTI620757006 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
-var NTI469762606 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979899 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979898 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979897 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979896 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979895 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979894 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979893 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979892 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979891 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979890 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979889 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979888 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979887 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979886 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979885 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979884 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979883 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979882 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979881 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979880 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979879 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979878 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979877 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979876 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979781 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979825 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979824 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979964 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979961 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
-var NTI603979960 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
-var NTI603979873 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979963 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
-var NTI603979874 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979813 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979812 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979925 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979815 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979814 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979924 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979923 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979823 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979822 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979922 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979921 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979817 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979816 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979920 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979927 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979819 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979818 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979926 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI33554456 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
-var NTI603979930 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979821 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979820 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null};
-var NTI603979794 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979793 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979801 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979800 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979799 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979798 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603979795 = {size: 0, kind: 14, base: null, node: null, finalizer: null};
-var NTI603979919 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979918 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979917 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI603979797 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI603979796 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI603980220 = {size: 0, kind: 24, base: null, node: null, finalizer: null};
-var NTI33555124 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI33555128 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI33555130 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI33555083 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI33555165 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI33554439 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
-var NTI33554440 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
-var NTI33555164 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
-var NTI33555112 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI33555113 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI33555120 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NTI33555122 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
-var NNI33555122 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI33555122.node = NNI33555122;
-var NNI33555120 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI33555120.node = NNI33555120;
-var NNI33555113 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI33555113.node = NNI33555113;
-NTI33555164.base = NTI33555112;
-NTI33555165.base = NTI33555112;
-var NNI33555112 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555164, name: "parent", sons: null},
-{kind: 1, offset: "name", len: 0, typ: NTI33554440, name: "name", sons: null},
-{kind: 1, offset: "message", len: 0, typ: NTI33554439, name: "msg", sons: null},
-{kind: 1, offset: "trace", len: 0, typ: NTI33554439, name: "trace", sons: null},
-{kind: 1, offset: "up", len: 0, typ: NTI33555165, name: "up", sons: null}]};
-NTI33555112.node = NNI33555112;
-var NNI33555083 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI33555083.node = NNI33555083;
-NTI33555112.base = NTI33555083;
-NTI33555113.base = NTI33555112;
-NTI33555120.base = NTI33555113;
-NTI33555122.base = NTI33555120;
-var NNI33555130 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI33555130.node = NNI33555130;
-NTI33555130.base = NTI33555113;
-var NNI33555128 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI33555128.node = NNI33555128;
-NTI33555128.base = NTI33555113;
-var NNI33555124 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI33555124.node = NNI33555124;
-NTI33555124.base = NTI33555113;
-NTI603979917.base = NTI603979796;
-NTI603979918.base = NTI603979796;
-NTI603979919.base = NTI603979796;
-var NNI603979795 = {kind: 2, offset: 0, typ: null, name: null, len: 12, sons: {"1": {kind: 1, offset: 1, typ: NTI603979795, name: "ElementNode", len: 0, sons: null},
-"2": {kind: 1, offset: 2, typ: NTI603979795, name: "AttributeNode", len: 0, sons: null},
-"3": {kind: 1, offset: 3, typ: NTI603979795, name: "TextNode", len: 0, sons: null},
-"4": {kind: 1, offset: 4, typ: NTI603979795, name: "CDATANode", len: 0, sons: null},
-"5": {kind: 1, offset: 5, typ: NTI603979795, name: "EntityRefNode", len: 0, sons: null},
-"6": {kind: 1, offset: 6, typ: NTI603979795, name: "EntityNode", len: 0, sons: null},
-"7": {kind: 1, offset: 7, typ: NTI603979795, name: "ProcessingInstructionNode", len: 0, sons: null},
-"8": {kind: 1, offset: 8, typ: NTI603979795, name: "CommentNode", len: 0, sons: null},
-"9": {kind: 1, offset: 9, typ: NTI603979795, name: "DocumentNode", len: 0, sons: null},
-"10": {kind: 1, offset: 10, typ: NTI603979795, name: "DocumentTypeNode", len: 0, sons: null},
-"11": {kind: 1, offset: 11, typ: NTI603979795, name: "DocumentFragmentNode", len: 0, sons: null},
-"12": {kind: 1, offset: 12, typ: NTI603979795, name: "NotationNode", len: 0, sons: null}}};
-NTI603979795.node = NNI603979795;
-var NNI603979794 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
-NTI603979794.node = NNI603979794;
-NTI603979794.base = NTI33555083;
-NTI603979793.base = NTI603979794;
-NTI603979930.base = NTI603979800;
-var NNI603979821 = {kind: 2, len: 10, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "acceptCharset", len: 0, typ: NTI33554440, name: "acceptCharset", sons: null},
-{kind: 1, offset: "action", len: 0, typ: NTI33554440, name: "action", sons: null},
-{kind: 1, offset: "autocomplete", len: 0, typ: NTI33554440, name: "autocomplete", sons: null},
-{kind: 1, offset: "elements", len: 0, typ: NTI603979930, name: "elements", sons: null},
-{kind: 1, offset: "encoding", len: 0, typ: NTI33554440, name: "encoding", sons: null},
-{kind: 1, offset: "enctype", len: 0, typ: NTI33554440, name: "enctype", sons: null},
-{kind: 1, offset: "length", len: 0, typ: NTI33554456, name: "length", sons: null},
-{kind: 1, offset: "method", len: 0, typ: NTI33554440, name: "method", sons: null},
-{kind: 1, offset: "noValidate", len: 0, typ: NTI33554466, name: "noValidate", sons: null},
-{kind: 1, offset: "target", len: 0, typ: NTI33554440, name: "target", sons: null}]};
-NTI603979821.node = NNI603979821;
-NTI603979821.base = NTI603979801;
-NTI603979820.base = NTI603979821;
-var NNI603979819 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "defaultSelected", len: 0, typ: NTI33554466, name: "defaultSelected", sons: null},
-{kind: 1, offset: "selected", len: 0, typ: NTI33554466, name: "selected", sons: null},
-{kind: 1, offset: "selectedIndex", len: 0, typ: NTI33554456, name: "selectedIndex", sons: null},
-{kind: 1, offset: "text", len: 0, typ: NTI33554440, name: "text", sons: null},
-{kind: 1, offset: "value", len: 0, typ: NTI33554440, name: "value", sons: null}]};
-NTI603979819.node = NNI603979819;
-NTI603979819.base = NTI603979801;
-NTI603979818.base = NTI603979819;
-NTI603979926.base = NTI603979818;
-NTI603979927.base = NTI603979818;
-var NNI603979801 = {kind: 2, len: 20, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "className", len: 0, typ: NTI33554440, name: "className", sons: null},
-{kind: 1, offset: "classList", len: 0, typ: NTI603979793, name: "classList", sons: null},
-{kind: 1, offset: "checked", len: 0, typ: NTI33554466, name: "checked", sons: null},
-{kind: 1, offset: "defaultChecked", len: 0, typ: NTI33554466, name: "defaultChecked", sons: null},
-{kind: 1, offset: "defaultValue", len: 0, typ: NTI33554440, name: "defaultValue", sons: null},
-{kind: 1, offset: "disabled", len: 0, typ: NTI33554466, name: "disabled", sons: null},
-{kind: 1, offset: "form", len: 0, typ: NTI603979820, name: "form", sons: null},
-{kind: 1, offset: "name", len: 0, typ: NTI33554440, name: "name", sons: null},
-{kind: 1, offset: "readOnly", len: 0, typ: NTI33554466, name: "readOnly", sons: null},
-{kind: 1, offset: "options", len: 0, typ: NTI603979926, name: "options", sons: null},
-{kind: 1, offset: "selectedOptions", len: 0, typ: NTI603979927, name: "selectedOptions", sons: null},
-{kind: 1, offset: "clientWidth", len: 0, typ: NTI33554456, name: "clientWidth", sons: null},
-{kind: 1, offset: "clientHeight", len: 0, typ: NTI33554456, name: "clientHeight", sons: null},
-{kind: 1, offset: "contentEditable", len: 0, typ: NTI33554440, name: "contentEditable", sons: null},
-{kind: 1, offset: "isContentEditable", len: 0, typ: NTI33554466, name: "isContentEditable", sons: null},
-{kind: 1, offset: "dir", len: 0, typ: NTI33554440, name: "dir", sons: null},
-{kind: 1, offset: "offsetHeight", len: 0, typ: NTI33554456, name: "offsetHeight", sons: null},
-{kind: 1, offset: "offsetWidth", len: 0, typ: NTI33554456, name: "offsetWidth", sons: null},
-{kind: 1, offset: "offsetLeft", len: 0, typ: NTI33554456, name: "offsetLeft", sons: null},
-{kind: 1, offset: "offsetTop", len: 0, typ: NTI33554456, name: "offsetTop", sons: null}]};
-NTI603979801.node = NNI603979801;
-NTI603979801.base = NTI603979797;
-NTI603979800.base = NTI603979801;
-var NNI603979817 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "text", len: 0, typ: NTI33554440, name: "text", sons: null},
-{kind: 1, offset: "x", len: 0, typ: NTI33554456, name: "x", sons: null},
-{kind: 1, offset: "y", len: 0, typ: NTI33554456, name: "y", sons: null}]};
-NTI603979817.node = NNI603979817;
-NTI603979817.base = NTI603979801;
-NTI603979816.base = NTI603979817;
-NTI603979920.base = NTI603979816;
-NTI603979921.base = NTI603979820;
-var NNI603979823 = {kind: 2, len: 8, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "border", len: 0, typ: NTI33554456, name: "border", sons: null},
-{kind: 1, offset: "complete", len: 0, typ: NTI33554466, name: "complete", sons: null},
-{kind: 1, offset: "height", len: 0, typ: NTI33554456, name: "height", sons: null},
-{kind: 1, offset: "hspace", len: 0, typ: NTI33554456, name: "hspace", sons: null},
-{kind: 1, offset: "lowsrc", len: 0, typ: NTI33554440, name: "lowsrc", sons: null},
-{kind: 1, offset: "src", len: 0, typ: NTI33554440, name: "src", sons: null},
-{kind: 1, offset: "vspace", len: 0, typ: NTI33554456, name: "vspace", sons: null},
-{kind: 1, offset: "width", len: 0, typ: NTI33554456, name: "width", sons: null}]};
-NTI603979823.node = NNI603979823;
-NTI603979823.base = NTI603979801;
-NTI603979822.base = NTI603979823;
-NTI603979922.base = NTI603979822;
-NTI603979923.base = NTI603979800;
-var NNI603979815 = {kind: 2, len: 6, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "height", len: 0, typ: NTI33554456, name: "height", sons: null},
-{kind: 1, offset: "hspace", len: 0, typ: NTI33554456, name: "hspace", sons: null},
-{kind: 1, offset: "src", len: 0, typ: NTI33554440, name: "src", sons: null},
-{kind: 1, offset: "width", len: 0, typ: NTI33554456, name: "width", sons: null},
-{kind: 1, offset: "type", len: 0, typ: NTI33554440, name: "type", sons: null},
-{kind: 1, offset: "vspace", len: 0, typ: NTI33554456, name: "vspace", sons: null}]};
-NTI603979815.node = NNI603979815;
-NTI603979815.base = NTI603979801;
-NTI603979814.base = NTI603979815;
-NTI603979924.base = NTI603979814;
-var NNI603979813 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "target", len: 0, typ: NTI33554440, name: "target", sons: null},
-{kind: 1, offset: "text", len: 0, typ: NTI33554440, name: "text", sons: null},
-{kind: 1, offset: "x", len: 0, typ: NTI33554456, name: "x", sons: null},
-{kind: 1, offset: "y", len: 0, typ: NTI33554456, name: "y", sons: null}]};
-NTI603979813.node = NNI603979813;
-NTI603979813.base = NTI603979801;
-NTI603979812.base = NTI603979813;
-NTI603979925.base = NTI603979812;
-var NNI603979960 = {kind: 1, offset: "then", len: 0, typ: NTI603979961, name: "then", sons: null};
-NTI603979960.node = NNI603979960;
-NTI603979873.base = NTI603979960;
-var NNI603979963 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "ready", len: 0, typ: NTI603979873, name: "ready", sons: null},
-{kind: 1, offset: "onloadingdone", len: 0, typ: NTI603979964, name: "onloadingdone", sons: null}]};
-NTI603979963.node = NNI603979963;
-NTI603979874.base = NTI603979963;
-var NNI603979799 = {kind: 2, len: 23, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "activeElement", len: 0, typ: NTI603979800, name: "activeElement", sons: null},
-{kind: 1, offset: "documentElement", len: 0, typ: NTI603979800, name: "documentElement", sons: null},
-{kind: 1, offset: "alinkColor", len: 0, typ: NTI33554440, name: "alinkColor", sons: null},
-{kind: 1, offset: "bgColor", len: 0, typ: NTI33554440, name: "bgColor", sons: null},
-{kind: 1, offset: "body", len: 0, typ: NTI603979800, name: "body", sons: null},
-{kind: 1, offset: "charset", len: 0, typ: NTI33554440, name: "charset", sons: null},
-{kind: 1, offset: "cookie", len: 0, typ: NTI33554440, name: "cookie", sons: null},
-{kind: 1, offset: "defaultCharset", len: 0, typ: NTI33554440, name: "defaultCharset", sons: null},
-{kind: 1, offset: "fgColor", len: 0, typ: NTI33554440, name: "fgColor", sons: null},
-{kind: 1, offset: "head", len: 0, typ: NTI603979800, name: "head", sons: null},
-{kind: 1, offset: "lastModified", len: 0, typ: NTI33554440, name: "lastModified", sons: null},
-{kind: 1, offset: "linkColor", len: 0, typ: NTI33554440, name: "linkColor", sons: null},
-{kind: 1, offset: "referrer", len: 0, typ: NTI33554440, name: "referrer", sons: null},
-{kind: 1, offset: "title", len: 0, typ: NTI33554440, name: "title", sons: null},
-{kind: 1, offset: "URL", len: 0, typ: NTI33554440, name: "URL", sons: null},
-{kind: 1, offset: "vlinkColor", len: 0, typ: NTI33554440, name: "vlinkColor", sons: null},
-{kind: 1, offset: "anchors", len: 0, typ: NTI603979920, name: "anchors", sons: null},
-{kind: 1, offset: "forms", len: 0, typ: NTI603979921, name: "forms", sons: null},
-{kind: 1, offset: "images", len: 0, typ: NTI603979922, name: "images", sons: null},
-{kind: 1, offset: "applets", len: 0, typ: NTI603979923, name: "applets", sons: null},
-{kind: 1, offset: "embeds", len: 0, typ: NTI603979924, name: "embeds", sons: null},
-{kind: 1, offset: "links", len: 0, typ: NTI603979925, name: "links", sons: null},
-{kind: 1, offset: "fonts", len: 0, typ: NTI603979874, name: "fonts", sons: null}]};
-NTI603979799.node = NNI603979799;
-NTI603979799.base = NTI603979797;
-NTI603979798.base = NTI603979799;
-var NNI603979825 = {kind: 2, len: 368, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "alignContent", len: 0, typ: NTI33554440, name: "alignContent", sons: null},
-{kind: 1, offset: "alignItems", len: 0, typ: NTI33554440, name: "alignItems", sons: null},
-{kind: 1, offset: "alignSelf", len: 0, typ: NTI33554440, name: "alignSelf", sons: null},
-{kind: 1, offset: "all", len: 0, typ: NTI33554440, name: "all", sons: null},
-{kind: 1, offset: "animation", len: 0, typ: NTI33554440, name: "animation", sons: null},
-{kind: 1, offset: "animationDelay", len: 0, typ: NTI33554440, name: "animationDelay", sons: null},
-{kind: 1, offset: "animationDirection", len: 0, typ: NTI33554440, name: "animationDirection", sons: null},
-{kind: 1, offset: "animationDuration", len: 0, typ: NTI33554440, name: "animationDuration", sons: null},
-{kind: 1, offset: "animationFillMode", len: 0, typ: NTI33554440, name: "animationFillMode", sons: null},
-{kind: 1, offset: "animationIterationCount", len: 0, typ: NTI33554440, name: "animationIterationCount", sons: null},
-{kind: 1, offset: "animationName", len: 0, typ: NTI33554440, name: "animationName", sons: null},
-{kind: 1, offset: "animationPlayState", len: 0, typ: NTI33554440, name: "animationPlayState", sons: null},
-{kind: 1, offset: "animationTimingFunction", len: 0, typ: NTI33554440, name: "animationTimingFunction", sons: null},
-{kind: 1, offset: "backdropFilter", len: 0, typ: NTI33554440, name: "backdropFilter", sons: null},
-{kind: 1, offset: "backfaceVisibility", len: 0, typ: NTI33554440, name: "backfaceVisibility", sons: null},
-{kind: 1, offset: "background", len: 0, typ: NTI33554440, name: "background", sons: null},
-{kind: 1, offset: "backgroundAttachment", len: 0, typ: NTI33554440, name: "backgroundAttachment", sons: null},
-{kind: 1, offset: "backgroundBlendMode", len: 0, typ: NTI33554440, name: "backgroundBlendMode", sons: null},
-{kind: 1, offset: "backgroundClip", len: 0, typ: NTI33554440, name: "backgroundClip", sons: null},
-{kind: 1, offset: "backgroundColor", len: 0, typ: NTI33554440, name: "backgroundColor", sons: null},
-{kind: 1, offset: "backgroundImage", len: 0, typ: NTI33554440, name: "backgroundImage", sons: null},
-{kind: 1, offset: "backgroundOrigin", len: 0, typ: NTI33554440, name: "backgroundOrigin", sons: null},
-{kind: 1, offset: "backgroundPosition", len: 0, typ: NTI33554440, name: "backgroundPosition", sons: null},
-{kind: 1, offset: "backgroundRepeat", len: 0, typ: NTI33554440, name: "backgroundRepeat", sons: null},
-{kind: 1, offset: "backgroundSize", len: 0, typ: NTI33554440, name: "backgroundSize", sons: null},
-{kind: 1, offset: "blockSize", len: 0, typ: NTI33554440, name: "blockSize", sons: null},
-{kind: 1, offset: "border", len: 0, typ: NTI33554440, name: "border", sons: null},
-{kind: 1, offset: "borderBlock", len: 0, typ: NTI33554440, name: "borderBlock", sons: null},
-{kind: 1, offset: "borderBlockColor", len: 0, typ: NTI33554440, name: "borderBlockColor", sons: null},
-{kind: 1, offset: "borderBlockEnd", len: 0, typ: NTI33554440, name: "borderBlockEnd", sons: null},
-{kind: 1, offset: "borderBlockEndColor", len: 0, typ: NTI33554440, name: "borderBlockEndColor", sons: null},
-{kind: 1, offset: "borderBlockEndStyle", len: 0, typ: NTI33554440, name: "borderBlockEndStyle", sons: null},
-{kind: 1, offset: "borderBlockEndWidth", len: 0, typ: NTI33554440, name: "borderBlockEndWidth", sons: null},
-{kind: 1, offset: "borderBlockStart", len: 0, typ: NTI33554440, name: "borderBlockStart", sons: null},
-{kind: 1, offset: "borderBlockStartColor", len: 0, typ: NTI33554440, name: "borderBlockStartColor", sons: null},
-{kind: 1, offset: "borderBlockStartStyle", len: 0, typ: NTI33554440, name: "borderBlockStartStyle", sons: null},
-{kind: 1, offset: "borderBlockStartWidth", len: 0, typ: NTI33554440, name: "borderBlockStartWidth", sons: null},
-{kind: 1, offset: "borderBlockStyle", len: 0, typ: NTI33554440, name: "borderBlockStyle", sons: null},
-{kind: 1, offset: "borderBlockWidth", len: 0, typ: NTI33554440, name: "borderBlockWidth", sons: null},
-{kind: 1, offset: "borderBottom", len: 0, typ: NTI33554440, name: "borderBottom", sons: null},
-{kind: 1, offset: "borderBottomColor", len: 0, typ: NTI33554440, name: "borderBottomColor", sons: null},
-{kind: 1, offset: "borderBottomLeftRadius", len: 0, typ: NTI33554440, name: "borderBottomLeftRadius", sons: null},
-{kind: 1, offset: "borderBottomRightRadius", len: 0, typ: NTI33554440, name: "borderBottomRightRadius", sons: null},
-{kind: 1, offset: "borderBottomStyle", len: 0, typ: NTI33554440, name: "borderBottomStyle", sons: null},
-{kind: 1, offset: "borderBottomWidth", len: 0, typ: NTI33554440, name: "borderBottomWidth", sons: null},
-{kind: 1, offset: "borderCollapse", len: 0, typ: NTI33554440, name: "borderCollapse", sons: null},
-{kind: 1, offset: "borderColor", len: 0, typ: NTI33554440, name: "borderColor", sons: null},
-{kind: 1, offset: "borderEndEndRadius", len: 0, typ: NTI33554440, name: "borderEndEndRadius", sons: null},
-{kind: 1, offset: "borderEndStartRadius", len: 0, typ: NTI33554440, name: "borderEndStartRadius", sons: null},
-{kind: 1, offset: "borderImage", len: 0, typ: NTI33554440, name: "borderImage", sons: null},
-{kind: 1, offset: "borderImageOutset", len: 0, typ: NTI33554440, name: "borderImageOutset", sons: null},
-{kind: 1, offset: "borderImageRepeat", len: 0, typ: NTI33554440, name: "borderImageRepeat", sons: null},
-{kind: 1, offset: "borderImageSlice", len: 0, typ: NTI33554440, name: "borderImageSlice", sons: null},
-{kind: 1, offset: "borderImageSource", len: 0, typ: NTI33554440, name: "borderImageSource", sons: null},
-{kind: 1, offset: "borderImageWidth", len: 0, typ: NTI33554440, name: "borderImageWidth", sons: null},
-{kind: 1, offset: "borderInline", len: 0, typ: NTI33554440, name: "borderInline", sons: null},
-{kind: 1, offset: "borderInlineColor", len: 0, typ: NTI33554440, name: "borderInlineColor", sons: null},
-{kind: 1, offset: "borderInlineEnd", len: 0, typ: NTI33554440, name: "borderInlineEnd", sons: null},
-{kind: 1, offset: "borderInlineEndColor", len: 0, typ: NTI33554440, name: "borderInlineEndColor", sons: null},
-{kind: 1, offset: "borderInlineEndStyle", len: 0, typ: NTI33554440, name: "borderInlineEndStyle", sons: null},
-{kind: 1, offset: "borderInlineEndWidth", len: 0, typ: NTI33554440, name: "borderInlineEndWidth", sons: null},
-{kind: 1, offset: "borderInlineStart", len: 0, typ: NTI33554440, name: "borderInlineStart", sons: null},
-{kind: 1, offset: "borderInlineStartColor", len: 0, typ: NTI33554440, name: "borderInlineStartColor", sons: null},
-{kind: 1, offset: "borderInlineStartStyle", len: 0, typ: NTI33554440, name: "borderInlineStartStyle", sons: null},
-{kind: 1, offset: "borderInlineStartWidth", len: 0, typ: NTI33554440, name: "borderInlineStartWidth", sons: null},
-{kind: 1, offset: "borderInlineStyle", len: 0, typ: NTI33554440, name: "borderInlineStyle", sons: null},
-{kind: 1, offset: "borderInlineWidth", len: 0, typ: NTI33554440, name: "borderInlineWidth", sons: null},
-{kind: 1, offset: "borderLeft", len: 0, typ: NTI33554440, name: "borderLeft", sons: null},
-{kind: 1, offset: "borderLeftColor", len: 0, typ: NTI33554440, name: "borderLeftColor", sons: null},
-{kind: 1, offset: "borderLeftStyle", len: 0, typ: NTI33554440, name: "borderLeftStyle", sons: null},
-{kind: 1, offset: "borderLeftWidth", len: 0, typ: NTI33554440, name: "borderLeftWidth", sons: null},
-{kind: 1, offset: "borderRadius", len: 0, typ: NTI33554440, name: "borderRadius", sons: null},
-{kind: 1, offset: "borderRight", len: 0, typ: NTI33554440, name: "borderRight", sons: null},
-{kind: 1, offset: "borderRightColor", len: 0, typ: NTI33554440, name: "borderRightColor", sons: null},
-{kind: 1, offset: "borderRightStyle", len: 0, typ: NTI33554440, name: "borderRightStyle", sons: null},
-{kind: 1, offset: "borderRightWidth", len: 0, typ: NTI33554440, name: "borderRightWidth", sons: null},
-{kind: 1, offset: "borderSpacing", len: 0, typ: NTI33554440, name: "borderSpacing", sons: null},
-{kind: 1, offset: "borderStartEndRadius", len: 0, typ: NTI33554440, name: "borderStartEndRadius", sons: null},
-{kind: 1, offset: "borderStartStartRadius", len: 0, typ: NTI33554440, name: "borderStartStartRadius", sons: null},
-{kind: 1, offset: "borderStyle", len: 0, typ: NTI33554440, name: "borderStyle", sons: null},
-{kind: 1, offset: "borderTop", len: 0, typ: NTI33554440, name: "borderTop", sons: null},
-{kind: 1, offset: "borderTopColor", len: 0, typ: NTI33554440, name: "borderTopColor", sons: null},
-{kind: 1, offset: "borderTopLeftRadius", len: 0, typ: NTI33554440, name: "borderTopLeftRadius", sons: null},
-{kind: 1, offset: "borderTopRightRadius", len: 0, typ: NTI33554440, name: "borderTopRightRadius", sons: null},
-{kind: 1, offset: "borderTopStyle", len: 0, typ: NTI33554440, name: "borderTopStyle", sons: null},
-{kind: 1, offset: "borderTopWidth", len: 0, typ: NTI33554440, name: "borderTopWidth", sons: null},
-{kind: 1, offset: "borderWidth", len: 0, typ: NTI33554440, name: "borderWidth", sons: null},
-{kind: 1, offset: "bottom", len: 0, typ: NTI33554440, name: "bottom", sons: null},
-{kind: 1, offset: "boxDecorationBreak", len: 0, typ: NTI33554440, name: "boxDecorationBreak", sons: null},
-{kind: 1, offset: "boxShadow", len: 0, typ: NTI33554440, name: "boxShadow", sons: null},
-{kind: 1, offset: "boxSizing", len: 0, typ: NTI33554440, name: "boxSizing", sons: null},
-{kind: 1, offset: "breakAfter", len: 0, typ: NTI33554440, name: "breakAfter", sons: null},
-{kind: 1, offset: "breakBefore", len: 0, typ: NTI33554440, name: "breakBefore", sons: null},
-{kind: 1, offset: "breakInside", len: 0, typ: NTI33554440, name: "breakInside", sons: null},
-{kind: 1, offset: "captionSide", len: 0, typ: NTI33554440, name: "captionSide", sons: null},
-{kind: 1, offset: "caretColor", len: 0, typ: NTI33554440, name: "caretColor", sons: null},
-{kind: 1, offset: "clear", len: 0, typ: NTI33554440, name: "clear", sons: null},
-{kind: 1, offset: "clip", len: 0, typ: NTI33554440, name: "clip", sons: null},
-{kind: 1, offset: "clipPath", len: 0, typ: NTI33554440, name: "clipPath", sons: null},
-{kind: 1, offset: "color", len: 0, typ: NTI33554440, name: "color", sons: null},
-{kind: 1, offset: "colorAdjust", len: 0, typ: NTI33554440, name: "colorAdjust", sons: null},
-{kind: 1, offset: "columnCount", len: 0, typ: NTI33554440, name: "columnCount", sons: null},
-{kind: 1, offset: "columnFill", len: 0, typ: NTI33554440, name: "columnFill", sons: null},
-{kind: 1, offset: "columnGap", len: 0, typ: NTI33554440, name: "columnGap", sons: null},
-{kind: 1, offset: "columnRule", len: 0, typ: NTI33554440, name: "columnRule", sons: null},
-{kind: 1, offset: "columnRuleColor", len: 0, typ: NTI33554440, name: "columnRuleColor", sons: null},
-{kind: 1, offset: "columnRuleStyle", len: 0, typ: NTI33554440, name: "columnRuleStyle", sons: null},
-{kind: 1, offset: "columnRuleWidth", len: 0, typ: NTI33554440, name: "columnRuleWidth", sons: null},
-{kind: 1, offset: "columnSpan", len: 0, typ: NTI33554440, name: "columnSpan", sons: null},
-{kind: 1, offset: "columnWidth", len: 0, typ: NTI33554440, name: "columnWidth", sons: null},
-{kind: 1, offset: "columns", len: 0, typ: NTI33554440, name: "columns", sons: null},
-{kind: 1, offset: "contain", len: 0, typ: NTI33554440, name: "contain", sons: null},
-{kind: 1, offset: "content", len: 0, typ: NTI33554440, name: "content", sons: null},
-{kind: 1, offset: "counterIncrement", len: 0, typ: NTI33554440, name: "counterIncrement", sons: null},
-{kind: 1, offset: "counterReset", len: 0, typ: NTI33554440, name: "counterReset", sons: null},
-{kind: 1, offset: "counterSet", len: 0, typ: NTI33554440, name: "counterSet", sons: null},
-{kind: 1, offset: "cursor", len: 0, typ: NTI33554440, name: "cursor", sons: null},
-{kind: 1, offset: "direction", len: 0, typ: NTI33554440, name: "direction", sons: null},
-{kind: 1, offset: "display", len: 0, typ: NTI33554440, name: "display", sons: null},
-{kind: 1, offset: "emptyCells", len: 0, typ: NTI33554440, name: "emptyCells", sons: null},
-{kind: 1, offset: "filter", len: 0, typ: NTI33554440, name: "filter", sons: null},
-{kind: 1, offset: "flex", len: 0, typ: NTI33554440, name: "flex", sons: null},
-{kind: 1, offset: "flexBasis", len: 0, typ: NTI33554440, name: "flexBasis", sons: null},
-{kind: 1, offset: "flexDirection", len: 0, typ: NTI33554440, name: "flexDirection", sons: null},
-{kind: 1, offset: "flexFlow", len: 0, typ: NTI33554440, name: "flexFlow", sons: null},
-{kind: 1, offset: "flexGrow", len: 0, typ: NTI33554440, name: "flexGrow", sons: null},
-{kind: 1, offset: "flexShrink", len: 0, typ: NTI33554440, name: "flexShrink", sons: null},
-{kind: 1, offset: "flexWrap", len: 0, typ: NTI33554440, name: "flexWrap", sons: null},
-{kind: 1, offset: "cssFloat", len: 0, typ: NTI33554440, name: "cssFloat", sons: null},
-{kind: 1, offset: "font", len: 0, typ: NTI33554440, name: "font", sons: null},
-{kind: 1, offset: "fontFamily", len: 0, typ: NTI33554440, name: "fontFamily", sons: null},
-{kind: 1, offset: "fontFeatureSettings", len: 0, typ: NTI33554440, name: "fontFeatureSettings", sons: null},
-{kind: 1, offset: "fontKerning", len: 0, typ: NTI33554440, name: "fontKerning", sons: null},
-{kind: 1, offset: "fontLanguageOverride", len: 0, typ: NTI33554440, name: "fontLanguageOverride", sons: null},
-{kind: 1, offset: "fontOpticalSizing", len: 0, typ: NTI33554440, name: "fontOpticalSizing", sons: null},
-{kind: 1, offset: "fontSize", len: 0, typ: NTI33554440, name: "fontSize", sons: null},
-{kind: 1, offset: "fontSizeAdjust", len: 0, typ: NTI33554440, name: "fontSizeAdjust", sons: null},
-{kind: 1, offset: "fontStretch", len: 0, typ: NTI33554440, name: "fontStretch", sons: null},
-{kind: 1, offset: "fontStyle", len: 0, typ: NTI33554440, name: "fontStyle", sons: null},
-{kind: 1, offset: "fontSynthesis", len: 0, typ: NTI33554440, name: "fontSynthesis", sons: null},
-{kind: 1, offset: "fontVariant", len: 0, typ: NTI33554440, name: "fontVariant", sons: null},
-{kind: 1, offset: "fontVariantAlternates", len: 0, typ: NTI33554440, name: "fontVariantAlternates", sons: null},
-{kind: 1, offset: "fontVariantCaps", len: 0, typ: NTI33554440, name: "fontVariantCaps", sons: null},
-{kind: 1, offset: "fontVariantEastAsian", len: 0, typ: NTI33554440, name: "fontVariantEastAsian", sons: null},
-{kind: 1, offset: "fontVariantLigatures", len: 0, typ: NTI33554440, name: "fontVariantLigatures", sons: null},
-{kind: 1, offset: "fontVariantNumeric", len: 0, typ: NTI33554440, name: "fontVariantNumeric", sons: null},
-{kind: 1, offset: "fontVariantPosition", len: 0, typ: NTI33554440, name: "fontVariantPosition", sons: null},
-{kind: 1, offset: "fontVariationSettings", len: 0, typ: NTI33554440, name: "fontVariationSettings", sons: null},
-{kind: 1, offset: "fontWeight", len: 0, typ: NTI33554440, name: "fontWeight", sons: null},
-{kind: 1, offset: "gap", len: 0, typ: NTI33554440, name: "gap", sons: null},
-{kind: 1, offset: "grid", len: 0, typ: NTI33554440, name: "grid", sons: null},
-{kind: 1, offset: "gridArea", len: 0, typ: NTI33554440, name: "gridArea", sons: null},
-{kind: 1, offset: "gridAutoColumns", len: 0, typ: NTI33554440, name: "gridAutoColumns", sons: null},
-{kind: 1, offset: "gridAutoFlow", len: 0, typ: NTI33554440, name: "gridAutoFlow", sons: null},
-{kind: 1, offset: "gridAutoRows", len: 0, typ: NTI33554440, name: "gridAutoRows", sons: null},
-{kind: 1, offset: "gridColumn", len: 0, typ: NTI33554440, name: "gridColumn", sons: null},
-{kind: 1, offset: "gridColumnEnd", len: 0, typ: NTI33554440, name: "gridColumnEnd", sons: null},
-{kind: 1, offset: "gridColumnStart", len: 0, typ: NTI33554440, name: "gridColumnStart", sons: null},
-{kind: 1, offset: "gridRow", len: 0, typ: NTI33554440, name: "gridRow", sons: null},
-{kind: 1, offset: "gridRowEnd", len: 0, typ: NTI33554440, name: "gridRowEnd", sons: null},
-{kind: 1, offset: "gridRowStart", len: 0, typ: NTI33554440, name: "gridRowStart", sons: null},
-{kind: 1, offset: "gridTemplate", len: 0, typ: NTI33554440, name: "gridTemplate", sons: null},
-{kind: 1, offset: "gridTemplateAreas", len: 0, typ: NTI33554440, name: "gridTemplateAreas", sons: null},
-{kind: 1, offset: "gridTemplateColumns", len: 0, typ: NTI33554440, name: "gridTemplateColumns", sons: null},
-{kind: 1, offset: "gridTemplateRows", len: 0, typ: NTI33554440, name: "gridTemplateRows", sons: null},
-{kind: 1, offset: "hangingPunctuation", len: 0, typ: NTI33554440, name: "hangingPunctuation", sons: null},
-{kind: 1, offset: "height", len: 0, typ: NTI33554440, name: "height", sons: null},
-{kind: 1, offset: "hyphens", len: 0, typ: NTI33554440, name: "hyphens", sons: null},
-{kind: 1, offset: "imageOrientation", len: 0, typ: NTI33554440, name: "imageOrientation", sons: null},
-{kind: 1, offset: "imageRendering", len: 0, typ: NTI33554440, name: "imageRendering", sons: null},
-{kind: 1, offset: "inlineSize", len: 0, typ: NTI33554440, name: "inlineSize", sons: null},
-{kind: 1, offset: "inset", len: 0, typ: NTI33554440, name: "inset", sons: null},
-{kind: 1, offset: "insetBlock", len: 0, typ: NTI33554440, name: "insetBlock", sons: null},
-{kind: 1, offset: "insetBlockEnd", len: 0, typ: NTI33554440, name: "insetBlockEnd", sons: null},
-{kind: 1, offset: "insetBlockStart", len: 0, typ: NTI33554440, name: "insetBlockStart", sons: null},
-{kind: 1, offset: "insetInline", len: 0, typ: NTI33554440, name: "insetInline", sons: null},
-{kind: 1, offset: "insetInlineEnd", len: 0, typ: NTI33554440, name: "insetInlineEnd", sons: null},
-{kind: 1, offset: "insetInlineStart", len: 0, typ: NTI33554440, name: "insetInlineStart", sons: null},
-{kind: 1, offset: "isolation", len: 0, typ: NTI33554440, name: "isolation", sons: null},
-{kind: 1, offset: "justifyContent", len: 0, typ: NTI33554440, name: "justifyContent", sons: null},
-{kind: 1, offset: "justifyItems", len: 0, typ: NTI33554440, name: "justifyItems", sons: null},
-{kind: 1, offset: "justifySelf", len: 0, typ: NTI33554440, name: "justifySelf", sons: null},
-{kind: 1, offset: "left", len: 0, typ: NTI33554440, name: "left", sons: null},
-{kind: 1, offset: "letterSpacing", len: 0, typ: NTI33554440, name: "letterSpacing", sons: null},
-{kind: 1, offset: "lineBreak", len: 0, typ: NTI33554440, name: "lineBreak", sons: null},
-{kind: 1, offset: "lineHeight", len: 0, typ: NTI33554440, name: "lineHeight", sons: null},
-{kind: 1, offset: "listStyle", len: 0, typ: NTI33554440, name: "listStyle", sons: null},
-{kind: 1, offset: "listStyleImage", len: 0, typ: NTI33554440, name: "listStyleImage", sons: null},
-{kind: 1, offset: "listStylePosition", len: 0, typ: NTI33554440, name: "listStylePosition", sons: null},
-{kind: 1, offset: "listStyleType", len: 0, typ: NTI33554440, name: "listStyleType", sons: null},
-{kind: 1, offset: "margin", len: 0, typ: NTI33554440, name: "margin", sons: null},
-{kind: 1, offset: "marginBlock", len: 0, typ: NTI33554440, name: "marginBlock", sons: null},
-{kind: 1, offset: "marginBlockEnd", len: 0, typ: NTI33554440, name: "marginBlockEnd", sons: null},
-{kind: 1, offset: "marginBlockStart", len: 0, typ: NTI33554440, name: "marginBlockStart", sons: null},
-{kind: 1, offset: "marginBottom", len: 0, typ: NTI33554440, name: "marginBottom", sons: null},
-{kind: 1, offset: "marginInline", len: 0, typ: NTI33554440, name: "marginInline", sons: null},
-{kind: 1, offset: "marginInlineEnd", len: 0, typ: NTI33554440, name: "marginInlineEnd", sons: null},
-{kind: 1, offset: "marginInlineStart", len: 0, typ: NTI33554440, name: "marginInlineStart", sons: null},
-{kind: 1, offset: "marginLeft", len: 0, typ: NTI33554440, name: "marginLeft", sons: null},
-{kind: 1, offset: "marginRight", len: 0, typ: NTI33554440, name: "marginRight", sons: null},
-{kind: 1, offset: "marginTop", len: 0, typ: NTI33554440, name: "marginTop", sons: null},
-{kind: 1, offset: "mask", len: 0, typ: NTI33554440, name: "mask", sons: null},
-{kind: 1, offset: "maskBorder", len: 0, typ: NTI33554440, name: "maskBorder", sons: null},
-{kind: 1, offset: "maskBorderMode", len: 0, typ: NTI33554440, name: "maskBorderMode", sons: null},
-{kind: 1, offset: "maskBorderOutset", len: 0, typ: NTI33554440, name: "maskBorderOutset", sons: null},
-{kind: 1, offset: "maskBorderRepeat", len: 0, typ: NTI33554440, name: "maskBorderRepeat", sons: null},
-{kind: 1, offset: "maskBorderSlice", len: 0, typ: NTI33554440, name: "maskBorderSlice", sons: null},
-{kind: 1, offset: "maskBorderSource", len: 0, typ: NTI33554440, name: "maskBorderSource", sons: null},
-{kind: 1, offset: "maskBorderWidth", len: 0, typ: NTI33554440, name: "maskBorderWidth", sons: null},
-{kind: 1, offset: "maskClip", len: 0, typ: NTI33554440, name: "maskClip", sons: null},
-{kind: 1, offset: "maskComposite", len: 0, typ: NTI33554440, name: "maskComposite", sons: null},
-{kind: 1, offset: "maskImage", len: 0, typ: NTI33554440, name: "maskImage", sons: null},
-{kind: 1, offset: "maskMode", len: 0, typ: NTI33554440, name: "maskMode", sons: null},
-{kind: 1, offset: "maskOrigin", len: 0, typ: NTI33554440, name: "maskOrigin", sons: null},
-{kind: 1, offset: "maskPosition", len: 0, typ: NTI33554440, name: "maskPosition", sons: null},
-{kind: 1, offset: "maskRepeat", len: 0, typ: NTI33554440, name: "maskRepeat", sons: null},
-{kind: 1, offset: "maskSize", len: 0, typ: NTI33554440, name: "maskSize", sons: null},
-{kind: 1, offset: "maskType", len: 0, typ: NTI33554440, name: "maskType", sons: null},
-{kind: 1, offset: "maxBlockSize", len: 0, typ: NTI33554440, name: "maxBlockSize", sons: null},
-{kind: 1, offset: "maxHeight", len: 0, typ: NTI33554440, name: "maxHeight", sons: null},
-{kind: 1, offset: "maxInlineSize", len: 0, typ: NTI33554440, name: "maxInlineSize", sons: null},
-{kind: 1, offset: "maxWidth", len: 0, typ: NTI33554440, name: "maxWidth", sons: null},
-{kind: 1, offset: "minBlockSize", len: 0, typ: NTI33554440, name: "minBlockSize", sons: null},
-{kind: 1, offset: "minHeight", len: 0, typ: NTI33554440, name: "minHeight", sons: null},
-{kind: 1, offset: "minInlineSize", len: 0, typ: NTI33554440, name: "minInlineSize", sons: null},
-{kind: 1, offset: "minWidth", len: 0, typ: NTI33554440, name: "minWidth", sons: null},
-{kind: 1, offset: "mixBlendMode", len: 0, typ: NTI33554440, name: "mixBlendMode", sons: null},
-{kind: 1, offset: "objectFit", len: 0, typ: NTI33554440, name: "objectFit", sons: null},
-{kind: 1, offset: "objectPosition", len: 0, typ: NTI33554440, name: "objectPosition", sons: null},
-{kind: 1, offset: "offset", len: 0, typ: NTI33554440, name: "offset", sons: null},
-{kind: 1, offset: "offsetAnchor", len: 0, typ: NTI33554440, name: "offsetAnchor", sons: null},
-{kind: 1, offset: "offsetDistance", len: 0, typ: NTI33554440, name: "offsetDistance", sons: null},
-{kind: 1, offset: "offsetPath", len: 0, typ: NTI33554440, name: "offsetPath", sons: null},
-{kind: 1, offset: "offsetRotate", len: 0, typ: NTI33554440, name: "offsetRotate", sons: null},
-{kind: 1, offset: "opacity", len: 0, typ: NTI33554440, name: "opacity", sons: null},
-{kind: 1, offset: "order", len: 0, typ: NTI33554440, name: "order", sons: null},
-{kind: 1, offset: "orphans", len: 0, typ: NTI33554440, name: "orphans", sons: null},
-{kind: 1, offset: "outline", len: 0, typ: NTI33554440, name: "outline", sons: null},
-{kind: 1, offset: "outlineColor", len: 0, typ: NTI33554440, name: "outlineColor", sons: null},
-{kind: 1, offset: "outlineOffset", len: 0, typ: NTI33554440, name: "outlineOffset", sons: null},
-{kind: 1, offset: "outlineStyle", len: 0, typ: NTI33554440, name: "outlineStyle", sons: null},
-{kind: 1, offset: "outlineWidth", len: 0, typ: NTI33554440, name: "outlineWidth", sons: null},
-{kind: 1, offset: "overflow", len: 0, typ: NTI33554440, name: "overflow", sons: null},
-{kind: 1, offset: "overflowAnchor", len: 0, typ: NTI33554440, name: "overflowAnchor", sons: null},
-{kind: 1, offset: "overflowBlock", len: 0, typ: NTI33554440, name: "overflowBlock", sons: null},
-{kind: 1, offset: "overflowInline", len: 0, typ: NTI33554440, name: "overflowInline", sons: null},
-{kind: 1, offset: "overflowWrap", len: 0, typ: NTI33554440, name: "overflowWrap", sons: null},
-{kind: 1, offset: "overflowX", len: 0, typ: NTI33554440, name: "overflowX", sons: null},
-{kind: 1, offset: "overflowY", len: 0, typ: NTI33554440, name: "overflowY", sons: null},
-{kind: 1, offset: "overscrollBehavior", len: 0, typ: NTI33554440, name: "overscrollBehavior", sons: null},
-{kind: 1, offset: "overscrollBehaviorBlock", len: 0, typ: NTI33554440, name: "overscrollBehaviorBlock", sons: null},
-{kind: 1, offset: "overscrollBehaviorInline", len: 0, typ: NTI33554440, name: "overscrollBehaviorInline", sons: null},
-{kind: 1, offset: "overscrollBehaviorX", len: 0, typ: NTI33554440, name: "overscrollBehaviorX", sons: null},
-{kind: 1, offset: "overscrollBehaviorY", len: 0, typ: NTI33554440, name: "overscrollBehaviorY", sons: null},
-{kind: 1, offset: "padding", len: 0, typ: NTI33554440, name: "padding", sons: null},
-{kind: 1, offset: "paddingBlock", len: 0, typ: NTI33554440, name: "paddingBlock", sons: null},
-{kind: 1, offset: "paddingBlockEnd", len: 0, typ: NTI33554440, name: "paddingBlockEnd", sons: null},
-{kind: 1, offset: "paddingBlockStart", len: 0, typ: NTI33554440, name: "paddingBlockStart", sons: null},
-{kind: 1, offset: "paddingBottom", len: 0, typ: NTI33554440, name: "paddingBottom", sons: null},
-{kind: 1, offset: "paddingInline", len: 0, typ: NTI33554440, name: "paddingInline", sons: null},
-{kind: 1, offset: "paddingInlineEnd", len: 0, typ: NTI33554440, name: "paddingInlineEnd", sons: null},
-{kind: 1, offset: "paddingInlineStart", len: 0, typ: NTI33554440, name: "paddingInlineStart", sons: null},
-{kind: 1, offset: "paddingLeft", len: 0, typ: NTI33554440, name: "paddingLeft", sons: null},
-{kind: 1, offset: "paddingRight", len: 0, typ: NTI33554440, name: "paddingRight", sons: null},
-{kind: 1, offset: "paddingTop", len: 0, typ: NTI33554440, name: "paddingTop", sons: null},
-{kind: 1, offset: "pageBreakAfter", len: 0, typ: NTI33554440, name: "pageBreakAfter", sons: null},
-{kind: 1, offset: "pageBreakBefore", len: 0, typ: NTI33554440, name: "pageBreakBefore", sons: null},
-{kind: 1, offset: "pageBreakInside", len: 0, typ: NTI33554440, name: "pageBreakInside", sons: null},
-{kind: 1, offset: "paintOrder", len: 0, typ: NTI33554440, name: "paintOrder", sons: null},
-{kind: 1, offset: "perspective", len: 0, typ: NTI33554440, name: "perspective", sons: null},
-{kind: 1, offset: "perspectiveOrigin", len: 0, typ: NTI33554440, name: "perspectiveOrigin", sons: null},
-{kind: 1, offset: "placeContent", len: 0, typ: NTI33554440, name: "placeContent", sons: null},
-{kind: 1, offset: "placeItems", len: 0, typ: NTI33554440, name: "placeItems", sons: null},
-{kind: 1, offset: "placeSelf", len: 0, typ: NTI33554440, name: "placeSelf", sons: null},
-{kind: 1, offset: "pointerEvents", len: 0, typ: NTI33554440, name: "pointerEvents", sons: null},
-{kind: 1, offset: "position", len: 0, typ: NTI33554440, name: "position", sons: null},
-{kind: 1, offset: "quotes", len: 0, typ: NTI33554440, name: "quotes", sons: null},
-{kind: 1, offset: "resize", len: 0, typ: NTI33554440, name: "resize", sons: null},
-{kind: 1, offset: "right", len: 0, typ: NTI33554440, name: "right", sons: null},
-{kind: 1, offset: "rotate", len: 0, typ: NTI33554440, name: "rotate", sons: null},
-{kind: 1, offset: "rowGap", len: 0, typ: NTI33554440, name: "rowGap", sons: null},
-{kind: 1, offset: "scale", len: 0, typ: NTI33554440, name: "scale", sons: null},
-{kind: 1, offset: "scrollBehavior", len: 0, typ: NTI33554440, name: "scrollBehavior", sons: null},
-{kind: 1, offset: "scrollMargin", len: 0, typ: NTI33554440, name: "scrollMargin", sons: null},
-{kind: 1, offset: "scrollMarginBlock", len: 0, typ: NTI33554440, name: "scrollMarginBlock", sons: null},
-{kind: 1, offset: "scrollMarginBlockEnd", len: 0, typ: NTI33554440, name: "scrollMarginBlockEnd", sons: null},
-{kind: 1, offset: "scrollMarginBlockStart", len: 0, typ: NTI33554440, name: "scrollMarginBlockStart", sons: null},
-{kind: 1, offset: "scrollMarginBottom", len: 0, typ: NTI33554440, name: "scrollMarginBottom", sons: null},
-{kind: 1, offset: "scrollMarginInline", len: 0, typ: NTI33554440, name: "scrollMarginInline", sons: null},
-{kind: 1, offset: "scrollMarginInlineEnd", len: 0, typ: NTI33554440, name: "scrollMarginInlineEnd", sons: null},
-{kind: 1, offset: "scrollMarginInlineStart", len: 0, typ: NTI33554440, name: "scrollMarginInlineStart", sons: null},
-{kind: 1, offset: "scrollMarginLeft", len: 0, typ: NTI33554440, name: "scrollMarginLeft", sons: null},
-{kind: 1, offset: "scrollMarginRight", len: 0, typ: NTI33554440, name: "scrollMarginRight", sons: null},
-{kind: 1, offset: "scrollMarginTop", len: 0, typ: NTI33554440, name: "scrollMarginTop", sons: null},
-{kind: 1, offset: "scrollPadding", len: 0, typ: NTI33554440, name: "scrollPadding", sons: null},
-{kind: 1, offset: "scrollPaddingBlock", len: 0, typ: NTI33554440, name: "scrollPaddingBlock", sons: null},
-{kind: 1, offset: "scrollPaddingBlockEnd", len: 0, typ: NTI33554440, name: "scrollPaddingBlockEnd", sons: null},
-{kind: 1, offset: "scrollPaddingBlockStart", len: 0, typ: NTI33554440, name: "scrollPaddingBlockStart", sons: null},
-{kind: 1, offset: "scrollPaddingBottom", len: 0, typ: NTI33554440, name: "scrollPaddingBottom", sons: null},
-{kind: 1, offset: "scrollPaddingInline", len: 0, typ: NTI33554440, name: "scrollPaddingInline", sons: null},
-{kind: 1, offset: "scrollPaddingInlineEnd", len: 0, typ: NTI33554440, name: "scrollPaddingInlineEnd", sons: null},
-{kind: 1, offset: "scrollPaddingInlineStart", len: 0, typ: NTI33554440, name: "scrollPaddingInlineStart", sons: null},
-{kind: 1, offset: "scrollPaddingLeft", len: 0, typ: NTI33554440, name: "scrollPaddingLeft", sons: null},
-{kind: 1, offset: "scrollPaddingRight", len: 0, typ: NTI33554440, name: "scrollPaddingRight", sons: null},
-{kind: 1, offset: "scrollPaddingTop", len: 0, typ: NTI33554440, name: "scrollPaddingTop", sons: null},
-{kind: 1, offset: "scrollSnapAlign", len: 0, typ: NTI33554440, name: "scrollSnapAlign", sons: null},
-{kind: 1, offset: "scrollSnapStop", len: 0, typ: NTI33554440, name: "scrollSnapStop", sons: null},
-{kind: 1, offset: "scrollSnapType", len: 0, typ: NTI33554440, name: "scrollSnapType", sons: null},
-{kind: 1, offset: "scrollbar3dLightColor", len: 0, typ: NTI33554440, name: "scrollbar3dLightColor", sons: null},
-{kind: 1, offset: "scrollbarArrowColor", len: 0, typ: NTI33554440, name: "scrollbarArrowColor", sons: null},
-{kind: 1, offset: "scrollbarBaseColor", len: 0, typ: NTI33554440, name: "scrollbarBaseColor", sons: null},
-{kind: 1, offset: "scrollbarColor", len: 0, typ: NTI33554440, name: "scrollbarColor", sons: null},
-{kind: 1, offset: "scrollbarDarkshadowColor", len: 0, typ: NTI33554440, name: "scrollbarDarkshadowColor", sons: null},
-{kind: 1, offset: "scrollbarFaceColor", len: 0, typ: NTI33554440, name: "scrollbarFaceColor", sons: null},
-{kind: 1, offset: "scrollbarHighlightColor", len: 0, typ: NTI33554440, name: "scrollbarHighlightColor", sons: null},
-{kind: 1, offset: "scrollbarShadowColor", len: 0, typ: NTI33554440, name: "scrollbarShadowColor", sons: null},
-{kind: 1, offset: "scrollbarTrackColor", len: 0, typ: NTI33554440, name: "scrollbarTrackColor", sons: null},
-{kind: 1, offset: "scrollbarWidth", len: 0, typ: NTI33554440, name: "scrollbarWidth", sons: null},
-{kind: 1, offset: "shapeImageThreshold", len: 0, typ: NTI33554440, name: "shapeImageThreshold", sons: null},
-{kind: 1, offset: "shapeMargin", len: 0, typ: NTI33554440, name: "shapeMargin", sons: null},
-{kind: 1, offset: "shapeOutside", len: 0, typ: NTI33554440, name: "shapeOutside", sons: null},
-{kind: 1, offset: "tabSize", len: 0, typ: NTI33554440, name: "tabSize", sons: null},
-{kind: 1, offset: "tableLayout", len: 0, typ: NTI33554440, name: "tableLayout", sons: null},
-{kind: 1, offset: "textAlign", len: 0, typ: NTI33554440, name: "textAlign", sons: null},
-{kind: 1, offset: "textAlignLast", len: 0, typ: NTI33554440, name: "textAlignLast", sons: null},
-{kind: 1, offset: "textCombineUpright", len: 0, typ: NTI33554440, name: "textCombineUpright", sons: null},
-{kind: 1, offset: "textDecoration", len: 0, typ: NTI33554440, name: "textDecoration", sons: null},
-{kind: 1, offset: "textDecorationColor", len: 0, typ: NTI33554440, name: "textDecorationColor", sons: null},
-{kind: 1, offset: "textDecorationLine", len: 0, typ: NTI33554440, name: "textDecorationLine", sons: null},
-{kind: 1, offset: "textDecorationSkipInk", len: 0, typ: NTI33554440, name: "textDecorationSkipInk", sons: null},
-{kind: 1, offset: "textDecorationStyle", len: 0, typ: NTI33554440, name: "textDecorationStyle", sons: null},
-{kind: 1, offset: "textDecorationThickness", len: 0, typ: NTI33554440, name: "textDecorationThickness", sons: null},
-{kind: 1, offset: "textEmphasis", len: 0, typ: NTI33554440, name: "textEmphasis", sons: null},
-{kind: 1, offset: "textEmphasisColor", len: 0, typ: NTI33554440, name: "textEmphasisColor", sons: null},
-{kind: 1, offset: "textEmphasisPosition", len: 0, typ: NTI33554440, name: "textEmphasisPosition", sons: null},
-{kind: 1, offset: "textEmphasisStyle", len: 0, typ: NTI33554440, name: "textEmphasisStyle", sons: null},
-{kind: 1, offset: "textIndent", len: 0, typ: NTI33554440, name: "textIndent", sons: null},
-{kind: 1, offset: "textJustify", len: 0, typ: NTI33554440, name: "textJustify", sons: null},
-{kind: 1, offset: "textOrientation", len: 0, typ: NTI33554440, name: "textOrientation", sons: null},
-{kind: 1, offset: "textOverflow", len: 0, typ: NTI33554440, name: "textOverflow", sons: null},
-{kind: 1, offset: "textRendering", len: 0, typ: NTI33554440, name: "textRendering", sons: null},
-{kind: 1, offset: "textShadow", len: 0, typ: NTI33554440, name: "textShadow", sons: null},
-{kind: 1, offset: "textTransform", len: 0, typ: NTI33554440, name: "textTransform", sons: null},
-{kind: 1, offset: "textUnderlineOffset", len: 0, typ: NTI33554440, name: "textUnderlineOffset", sons: null},
-{kind: 1, offset: "textUnderlinePosition", len: 0, typ: NTI33554440, name: "textUnderlinePosition", sons: null},
-{kind: 1, offset: "top", len: 0, typ: NTI33554440, name: "top", sons: null},
-{kind: 1, offset: "touchAction", len: 0, typ: NTI33554440, name: "touchAction", sons: null},
-{kind: 1, offset: "transform", len: 0, typ: NTI33554440, name: "transform", sons: null},
-{kind: 1, offset: "transformBox", len: 0, typ: NTI33554440, name: "transformBox", sons: null},
-{kind: 1, offset: "transformOrigin", len: 0, typ: NTI33554440, name: "transformOrigin", sons: null},
-{kind: 1, offset: "transformStyle", len: 0, typ: NTI33554440, name: "transformStyle", sons: null},
-{kind: 1, offset: "transition", len: 0, typ: NTI33554440, name: "transition", sons: null},
-{kind: 1, offset: "transitionDelay", len: 0, typ: NTI33554440, name: "transitionDelay", sons: null},
-{kind: 1, offset: "transitionDuration", len: 0, typ: NTI33554440, name: "transitionDuration", sons: null},
-{kind: 1, offset: "transitionProperty", len: 0, typ: NTI33554440, name: "transitionProperty", sons: null},
-{kind: 1, offset: "transitionTimingFunction", len: 0, typ: NTI33554440, name: "transitionTimingFunction", sons: null},
-{kind: 1, offset: "translate", len: 0, typ: NTI33554440, name: "translate", sons: null},
-{kind: 1, offset: "unicodeBidi", len: 0, typ: NTI33554440, name: "unicodeBidi", sons: null},
-{kind: 1, offset: "verticalAlign", len: 0, typ: NTI33554440, name: "verticalAlign", sons: null},
-{kind: 1, offset: "visibility", len: 0, typ: NTI33554440, name: "visibility", sons: null},
-{kind: 1, offset: "whiteSpace", len: 0, typ: NTI33554440, name: "whiteSpace", sons: null},
-{kind: 1, offset: "widows", len: 0, typ: NTI33554440, name: "widows", sons: null},
-{kind: 1, offset: "width", len: 0, typ: NTI33554440, name: "width", sons: null},
-{kind: 1, offset: "willChange", len: 0, typ: NTI33554440, name: "willChange", sons: null},
-{kind: 1, offset: "wordBreak", len: 0, typ: NTI33554440, name: "wordBreak", sons: null},
-{kind: 1, offset: "wordSpacing", len: 0, typ: NTI33554440, name: "wordSpacing", sons: null},
-{kind: 1, offset: "writingMode", len: 0, typ: NTI33554440, name: "writingMode", sons: null},
-{kind: 1, offset: "zIndex", len: 0, typ: NTI33554440, name: "zIndex", sons: null}]};
-NTI603979825.node = NNI603979825;
-NTI603979825.base = NTI33555083;
-NTI603979824.base = NTI603979825;
-var NNI603979797 = {kind: 2, len: 22, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "attributes", len: 0, typ: NTI603979917, name: "attributes", sons: null},
-{kind: 1, offset: "childNodes", len: 0, typ: NTI603979918, name: "childNodes", sons: null},
-{kind: 1, offset: "children", len: 0, typ: NTI603979919, name: "children", sons: null},
-{kind: 1, offset: "data", len: 0, typ: NTI33554440, name: "data", sons: null},
-{kind: 1, offset: "firstChild", len: 0, typ: NTI603979796, name: "firstChild", sons: null},
-{kind: 1, offset: "lastChild", len: 0, typ: NTI603979796, name: "lastChild", sons: null},
-{kind: 1, offset: "nextSibling", len: 0, typ: NTI603979796, name: "nextSibling", sons: null},
-{kind: 1, offset: "nodeName", len: 0, typ: NTI33554440, name: "nodeName", sons: null},
-{kind: 1, offset: "nodeType", len: 0, typ: NTI603979795, name: "nodeType", sons: null},
-{kind: 1, offset: "nodeValue", len: 0, typ: NTI33554440, name: "nodeValue", sons: null},
-{kind: 1, offset: "parentNode", len: 0, typ: NTI603979796, name: "parentNode", sons: null},
-{kind: 1, offset: "content", len: 0, typ: NTI603979796, name: "content", sons: null},
-{kind: 1, offset: "previousSibling", len: 0, typ: NTI603979796, name: "previousSibling", sons: null},
-{kind: 1, offset: "ownerDocument", len: 0, typ: NTI603979798, name: "ownerDocument", sons: null},
-{kind: 1, offset: "innerHTML", len: 0, typ: NTI33554440, name: "innerHTML", sons: null},
-{kind: 1, offset: "outerHTML", len: 0, typ: NTI33554440, name: "outerHTML", sons: null},
-{kind: 1, offset: "innerText", len: 0, typ: NTI33554440, name: "innerText", sons: null},
-{kind: 1, offset: "textContent", len: 0, typ: NTI33554440, name: "textContent", sons: null},
-{kind: 1, offset: "style", len: 0, typ: NTI603979824, name: "style", sons: null},
-{kind: 1, offset: "baseURI", len: 0, typ: NTI33554440, name: "baseURI", sons: null},
-{kind: 1, offset: "parentElement", len: 0, typ: NTI603979800, name: "parentElement", sons: null},
-{kind: 1, offset: "isConnected", len: 0, typ: NTI33554466, name: "isConnected", sons: null}]};
-NTI603979797.node = NNI603979797;
-var NNI603979781 = {kind: 2, len: 24, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "onabort", len: 0, typ: NTI603979876, name: "onabort", sons: null},
-{kind: 1, offset: "onblur", len: 0, typ: NTI603979877, name: "onblur", sons: null},
-{kind: 1, offset: "onchange", len: 0, typ: NTI603979878, name: "onchange", sons: null},
-{kind: 1, offset: "onclick", len: 0, typ: NTI603979879, name: "onclick", sons: null},
-{kind: 1, offset: "ondblclick", len: 0, typ: NTI603979880, name: "ondblclick", sons: null},
-{kind: 1, offset: "onerror", len: 0, typ: NTI603979881, name: "onerror", sons: null},
-{kind: 1, offset: "onfocus", len: 0, typ: NTI603979882, name: "onfocus", sons: null},
-{kind: 1, offset: "onkeydown", len: 0, typ: NTI603979883, name: "onkeydown", sons: null},
-{kind: 1, offset: "onkeypress", len: 0, typ: NTI603979884, name: "onkeypress", sons: null},
-{kind: 1, offset: "onkeyup", len: 0, typ: NTI603979885, name: "onkeyup", sons: null},
-{kind: 1, offset: "onload", len: 0, typ: NTI603979886, name: "onload", sons: null},
-{kind: 1, offset: "onmousedown", len: 0, typ: NTI603979887, name: "onmousedown", sons: null},
-{kind: 1, offset: "onmousemove", len: 0, typ: NTI603979888, name: "onmousemove", sons: null},
-{kind: 1, offset: "onmouseout", len: 0, typ: NTI603979889, name: "onmouseout", sons: null},
-{kind: 1, offset: "onmouseover", len: 0, typ: NTI603979890, name: "onmouseover", sons: null},
-{kind: 1, offset: "onmouseup", len: 0, typ: NTI603979891, name: "onmouseup", sons: null},
-{kind: 1, offset: "onreset", len: 0, typ: NTI603979892, name: "onreset", sons: null},
-{kind: 1, offset: "onselect", len: 0, typ: NTI603979893, name: "onselect", sons: null},
-{kind: 1, offset: "onstorage", len: 0, typ: NTI603979894, name: "onstorage", sons: null},
-{kind: 1, offset: "onsubmit", len: 0, typ: NTI603979895, name: "onsubmit", sons: null},
-{kind: 1, offset: "onunload", len: 0, typ: NTI603979896, name: "onunload", sons: null},
-{kind: 1, offset: "onloadstart", len: 0, typ: NTI603979897, name: "onloadstart", sons: null},
-{kind: 1, offset: "onprogress", len: 0, typ: NTI603979898, name: "onprogress", sons: null},
-{kind: 1, offset: "onloadend", len: 0, typ: NTI603979899, name: "onloadend", sons: null}]};
-NTI603979781.node = NNI603979781;
-NTI603979781.base = NTI33555083;
-NTI603979797.base = NTI603979781;
-NTI603979796.base = NTI603979797;
-NTI603980220.base = NTI603979796;
-NTI469762606.base = NTI33554440;
-var NNI620757006 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554456, name: "Field0", sons: null},
+var NTI738197518 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
+var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
+var NTI973078608 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
+var NTI973078615 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
+var NTI134217745 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI134217749 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI134217751 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI33555167 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI33555175 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
+var NTI33554450 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
+var NTI33555174 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
+var NTI33555171 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI33555172 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI134217741 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI134217743 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
+var NTI33554449 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
+var NNI134217743 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
+NTI134217743.node = NNI134217743;
+var NNI134217741 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
+NTI134217741.node = NNI134217741;
+var NNI33555172 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
+NTI33555172.node = NNI33555172;
+NTI33555174.base = NTI33555171;
+NTI33555175.base = NTI33555171;
+var NNI33555171 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555174, name: "parent", sons: null},
+{kind: 1, offset: "name", len: 0, typ: NTI33554450, name: "name", sons: null},
+{kind: 1, offset: "message", len: 0, typ: NTI33554449, name: "msg", sons: null},
+{kind: 1, offset: "trace", len: 0, typ: NTI33554449, name: "trace", sons: null},
+{kind: 1, offset: "up", len: 0, typ: NTI33555175, name: "up", sons: null}]};
+NTI33555171.node = NNI33555171;
+var NNI33555167 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
+NTI33555167.node = NNI33555167;
+NTI33555171.base = NTI33555167;
+NTI33555172.base = NTI33555171;
+NTI134217741.base = NTI33555172;
+NTI134217743.base = NTI134217741;
+var NNI134217751 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
+NTI134217751.node = NNI134217751;
+NTI134217751.base = NTI33555172;
+var NNI134217749 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
+NTI134217749.node = NNI134217749;
+NTI134217749.base = NTI33555172;
+var NNI134217745 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
+NTI134217745.node = NNI134217745;
+NTI134217745.base = NTI33555172;
+var NNI973078615 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI973078608, name: "a", sons: null},
+{kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]};
+NTI973078615.node = NNI973078615;
+var NNI738197518 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554435, name: "Field0", sons: null},
{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]};
-NTI620757006.node = NNI620757006;
-
-function makeNimstrLit(c_33556801) {
- var result = [];
- for (var i = 0; i < c_33556801.length; ++i) {
- result[i] = c_33556801.charCodeAt(i);
- }
- return result;
-
-
-
-}
-
-function toJSStr(s_33556807) {
- var Temporary5;
- var Temporary7;
-
- var result_33556808 = null;
-
- var res_33556842 = newSeq_33556825((s_33556807).length);
- var i_33556843 = 0;
- var j_33556844 = 0;
- Label1: do {
- Label2: while (true) {
- if (!(i_33556843 < (s_33556807).length)) break Label2;
- var c_33556845 = s_33556807[i_33556843];
- if ((c_33556845 < 128)) {
- res_33556842[j_33556844] = String.fromCharCode(c_33556845);
- i_33556843 += 1;
- }
- else {
- var helper_33556857 = newSeq_33556825(0);
- Label3: do {
- Label4: while (true) {
- if (!true) break Label4;
- var code_33556858 = c_33556845.toString(16);
- if ((((code_33556858) == null ? 0 : (code_33556858).length) == 1)) {
- helper_33556857.push("%0");;
- }
- else {
- helper_33556857.push("%");;
- }
-
- helper_33556857.push(code_33556858);;
- i_33556843 += 1;
- if (((s_33556807).length <= i_33556843)) Temporary5 = true; else { Temporary5 = (s_33556807[i_33556843] < 128); } if (Temporary5) {
- break Label3;
- }
-
- c_33556845 = s_33556807[i_33556843];
- }
- } while (false);
-++excHandler;
- Temporary7 = framePtr;
- try {
- res_33556842[j_33556844] = decodeURIComponent(helper_33556857.join(""));
---excHandler;
-} catch (EXCEPTION) {
- var prevJSError = lastJSError;
- lastJSError = EXCEPTION;
- --excHandler;
- framePtr = Temporary7;
- res_33556842[j_33556844] = helper_33556857.join("");
- lastJSError = prevJSError;
- } finally {
- framePtr = Temporary7;
- }
- }
-
- j_33556844 += 1;
- }
- } while (false);
- if (res_33556842.length < j_33556844) { for (var i = res_33556842.length ; i < j_33556844 ; ++i) res_33556842.push(null); }
- else { res_33556842.length = j_33556844; };
- result_33556808 = res_33556842.join("");
-
- return result_33556808;
-
-}
-
-function raiseException(e_33556667, ename_33556668) {
- e_33556667.name = ename_33556668;
- if ((excHandler == 0)) {
- unhandledException(e_33556667);
- }
-
- throw e_33556667;
-
-
-}
-
-function addInt(a_33556940, b_33556941) {
- var result = a_33556940 + b_33556941;
- checkOverflowInt(result);
- return result;
-
-
-
-}
-
-function mnewString(len_33556893) {
- return new Array(len_33556893);
-
-
-
-}
-
-function chckRange(i_33557189, a_33557190, b_33557191) {
- var Temporary1;
-
- var result_33557192 = 0;
-
- BeforeRet: do {
- if (!(a_33557190 <= i_33557189)) Temporary1 = false; else { Temporary1 = (i_33557189 <= b_33557191); } if (Temporary1) {
- result_33557192 = i_33557189;
- break BeforeRet;
- }
- else {
- raiseRangeError();
- }
-
- } while (false);
-
- return result_33557192;
-
-}
+NTI738197518.node = NNI738197518;
function setConstr() {
var result = {};
@@ -825,115 +74,324 @@ function setConstr() {
}
var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21);
-function nimCopy(dest_33557140, src_33557141, ti_33557142) {
- var result_33557151 = null;
+function nimCopy(dest_p0, src_p1, ti_p2) {
+ var result_33557344 = null;
- switch (ti_33557142.kind) {
+ switch (ti_p2.kind) {
case 21:
case 22:
case 23:
case 5:
- if (!(isFatPointer_33557131(ti_33557142))) {
- result_33557151 = src_33557141;
+ if (!(isFatPointer__system_u2892(ti_p2))) {
+ result_33557344 = src_p1;
}
else {
- result_33557151 = [src_33557141[0], src_33557141[1]];
+ result_33557344 = [src_p1[0], src_p1[1]];
}
break;
case 19:
- if (dest_33557140 === null || dest_33557140 === undefined) {
- dest_33557140 = {};
+ if (dest_p0 === null || dest_p0 === undefined) {
+ dest_p0 = {};
}
else {
- for (var key in dest_33557140) { delete dest_33557140[key]; }
+ for (var key in dest_p0) { delete dest_p0[key]; }
}
- for (var key in src_33557141) { dest_33557140[key] = src_33557141[key]; }
- result_33557151 = dest_33557140;
+ for (var key in src_p1) { dest_p0[key] = src_p1[key]; }
+ result_33557344 = dest_p0;
break;
case 18:
case 17:
- if (!((ti_33557142.base == null))) {
- result_33557151 = nimCopy(dest_33557140, src_33557141, ti_33557142.base);
+ if (!((ti_p2.base == null))) {
+ result_33557344 = nimCopy(dest_p0, src_p1, ti_p2.base);
}
else {
- if ((ti_33557142.kind == 17)) {
- result_33557151 = (dest_33557140 === null || dest_33557140 === undefined) ? {m_type: ti_33557142} : dest_33557140;
+ if ((ti_p2.kind == 17)) {
+ result_33557344 = (dest_p0 === null || dest_p0 === undefined) ? {m_type: ti_p2} : dest_p0;
}
else {
- result_33557151 = (dest_33557140 === null || dest_33557140 === undefined) ? {} : dest_33557140;
+ result_33557344 = (dest_p0 === null || dest_p0 === undefined) ? {} : dest_p0;
}
}
- nimCopyAux(result_33557151, src_33557141, ti_33557142.node);
+ nimCopyAux(result_33557344, src_p1, ti_p2.node);
break;
- case 24:
case 4:
- case 27:
case 16:
- if (src_33557141 === null) {
- result_33557151 = null;
+ if(ArrayBuffer.isView(src_p1)) {
+ if(dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
+ dest_p0 = new src_p1.constructor(src_p1);
+ } else {
+ dest_p0.set(src_p1, 0);
+ }
+ result_33557344 = dest_p0;
+ } else {
+ if (src_p1 === null) {
+ result_33557344 = null;
+ }
+ else {
+ if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
+ dest_p0 = new Array(src_p1.length);
+ }
+ result_33557344 = dest_p0;
+ for (var i = 0; i < src_p1.length; ++i) {
+ result_33557344[i] = nimCopy(result_33557344[i], src_p1[i], ti_p2.base);
+ }
+ }
+ }
+
+ break;
+ case 24:
+ case 27:
+ if (src_p1 === null) {
+ result_33557344 = null;
}
else {
- if (dest_33557140 === null || dest_33557140 === undefined || dest_33557140.length != src_33557141.length) {
- dest_33557140 = new Array(src_33557141.length);
+ if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
+ dest_p0 = new Array(src_p1.length);
}
- result_33557151 = dest_33557140;
- for (var i = 0; i < src_33557141.length; ++i) {
- result_33557151[i] = nimCopy(result_33557151[i], src_33557141[i], ti_33557142.base);
+ result_33557344 = dest_p0;
+ for (var i = 0; i < src_p1.length; ++i) {
+ result_33557344[i] = nimCopy(result_33557344[i], src_p1[i], ti_p2.base);
}
}
break;
case 28:
- if (src_33557141 !== null) {
- result_33557151 = src_33557141.slice(0);
+ if (src_p1 !== null) {
+ result_33557344 = src_p1.slice(0);
}
break;
default:
- result_33557151 = src_33557141;
+ result_33557344 = src_p1;
break;
}
- return result_33557151;
+ return result_33557344;
+
+}
+
+function mnewString(len_p0) {
+ var result = new Array(len_p0);
+ for (var i = 0; i < len_p0; i++) {result[i] = 0;}
+ return result;
+
+
+
+}
+
+function isObj(obj_p0, subclass_p1) {
+ var result_33557457 = false;
+
+ BeforeRet: {
+ var x_33557458 = obj_p0;
+ if ((x_33557458 == subclass_p1)) {
+ result_33557457 = true;
+ break BeforeRet;
+ }
+
+ Label1: {
+ Label2: while (true) {
+ if (!!((x_33557458 == subclass_p1))) break Label2;
+ if ((x_33557458 == null)) {
+ result_33557457 = false;
+ break BeforeRet;
+ }
+
+ x_33557458 = x_33557458.base;
+ }
+ };
+ result_33557457 = true;
+ break BeforeRet;
+ };
+
+ return result_33557457;
+
+}
+
+function toJSStr(s_p0) {
+ var result_33556933 = null;
+
+ var res_33556987 = newSeq__system_u2530((s_p0).length);
+ var i_33556988 = 0;
+ var j_33556989 = 0;
+ Label1: {
+ Label2: while (true) {
+ if (!(i_33556988 < (s_p0).length)) break Label2;
+ var c_33556990 = s_p0[i_33556988];
+ if ((c_33556990 < 128)) {
+ res_33556987[j_33556989] = String.fromCharCode(c_33556990);
+ i_33556988 += 1;
+ }
+ else {
+ var helper_33557016 = newSeq__system_u2530(0);
+ Label3: {
+ Label4: while (true) {
+ if (!true) break Label4;
+ var code_33557017 = c_33556990.toString(16);
+ if ((((code_33557017) == null ? 0 : (code_33557017).length) == 1)) {
+ helper_33557016.push("%0");;
+ }
+ else {
+ helper_33557016.push("%");;
+ }
+
+ helper_33557016.push(code_33557017);;
+ i_33556988 += 1;
+ if ((((s_p0).length <= i_33556988) || (s_p0[i_33556988] < 128))) {
+ break Label3;
+ }
+
+ c_33556990 = s_p0[i_33556988];
+ }
+ };
+++excHandler;
+ try {
+ res_33556987[j_33556989] = decodeURIComponent(helper_33557016.join(""));
+--excHandler;
+} catch (EXCEPTION) {
+ var prevJSError = lastJSError;
+ lastJSError = EXCEPTION;
+ --excHandler;
+ raiseDefect();
+ res_33556987[j_33556989] = helper_33557016.join("");
+ lastJSError = prevJSError;
+ } finally {
+ }
+ }
+
+ j_33556989 += 1;
+ }
+ };
+ if (res_33556987.length < j_33556989) { for (var i = res_33556987.length ; i < j_33556989 ; ++i) res_33556987.push(null); }
+ else { res_33556987.length = j_33556989; };
+ result_33556933 = res_33556987.join("");
+
+ return result_33556933;
+
+}
+
+function raiseException(e_p0, ename_p1) {
+ e_p0.name = ename_p1;
+ if ((excHandler == 0)) {
+ unhandledException(e_p0);
+ }
+
+ throw e_p0;
+
+
+}
+
+function addInt(a_p0, b_p1) {
+ var result = a_p0 + b_p1;
+ checkOverflowInt(result);
+ return result;
+
+
}
-function chckIndx(i_33557184, a_33557185, b_33557186) {
- var Temporary1;
+function chckRange(i_p0, a_p1, b_p2) {
+ var result_33557384 = 0;
+
+ BeforeRet: {
+ if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) {
+ result_33557384 = i_p0;
+ break BeforeRet;
+ }
+ else {
+ raiseRangeError();
+ }
+
+ };
- var result_33557187 = 0;
+ return result_33557384;
- BeforeRet: do {
- if (!(a_33557185 <= i_33557184)) Temporary1 = false; else { Temporary1 = (i_33557184 <= b_33557186); } if (Temporary1) {
- result_33557187 = i_33557184;
+}
+
+function chckIndx(i_p0, a_p1, b_p2) {
+ var result_33557379 = 0;
+
+ BeforeRet: {
+ if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) {
+ result_33557379 = i_p0;
break BeforeRet;
}
else {
- raiseIndexError(i_33557184, a_33557185, b_33557186);
+ raiseIndexError(i_p0, a_p1, b_p2);
}
- } while (false);
+ };
- return result_33557187;
+ return result_33557379;
}
-function subInt(a_33556944, b_33556945) {
- var result = a_33556944 - b_33556945;
+function makeNimstrLit(c_p0) {
+ var result = [];
+ for (var i = 0; i < c_p0.length; ++i) {
+ result[i] = c_p0.charCodeAt(i);
+ }
+ return result;
+
+
+
+}
+
+function subInt(a_p0, b_p1) {
+ var result = a_p0 - b_p1;
checkOverflowInt(result);
return result;
+}
+
+function cstrToNimstr(c_p0) {
+ var ln = c_p0.length;
+ var result = new Array(ln);
+ var r = 0;
+ for (var i = 0; i < ln; ++i) {
+ var ch = c_p0.charCodeAt(i);
+
+ if (ch < 128) {
+ result[r] = ch;
+ }
+ else {
+ if (ch < 2048) {
+ result[r] = (ch >> 6) | 192;
+ }
+ else {
+ if (ch < 55296 || ch >= 57344) {
+ result[r] = (ch >> 12) | 224;
+ }
+ else {
+ ++i;
+ ch = 65536 + (((ch & 1023) << 10) | (c_p0.charCodeAt(i) & 1023));
+ result[r] = (ch >> 18) | 240;
+ ++r;
+ result[r] = ((ch >> 12) & 63) | 128;
+ }
+ ++r;
+ result[r] = ((ch >> 6) & 63) | 128;
+ }
+ ++r;
+ result[r] = (ch & 63) | 128;
+ }
+ ++r;
+ }
+ return result;
+
+
+
}
var ConstSet2 = setConstr([65, 90]);
var ConstSet3 = setConstr(95, 32, 46);
var ConstSet4 = setConstr(95, 32, 46);
-function mulInt(a_33556948, b_33556949) {
- var result = a_33556948 * b_33556949;
+function mulInt(a_p0, b_p1) {
+ var result = a_p0 * b_p1;
checkOverflowInt(result);
return result;
@@ -946,103 +404,174 @@ var ConstSet7 = setConstr([97, 122]);
var ConstSet8 = setConstr([65, 90]);
var ConstSet9 = setConstr([65, 90], [97, 122]);
-function nimMax(a_33556998, b_33556999) {
+function nimMax(a_p0, b_p1) {
var Temporary1;
- var result_33557000 = 0;
+ var result_33557171 = 0;
- BeforeRet: do {
- if ((b_33556999 <= a_33556998)) {
- Temporary1 = a_33556998;
+ BeforeRet: {
+ if ((b_p1 <= a_p0)) {
+ Temporary1 = a_p0;
}
else {
- Temporary1 = b_33556999;
+ Temporary1 = b_p1;
}
- result_33557000 = Temporary1;
+ result_33557171 = Temporary1;
break BeforeRet;
- } while (false);
+ };
- return result_33557000;
+ return result_33557171;
}
-function nimMin(a_33556994, b_33556995) {
+function nimMin(a_p0, b_p1) {
var Temporary1;
- var result_33556996 = 0;
+ var result_33557167 = 0;
- BeforeRet: do {
- if ((a_33556994 <= b_33556995)) {
- Temporary1 = a_33556994;
+ BeforeRet: {
+ if ((a_p0 <= b_p1)) {
+ Temporary1 = a_p0;
}
else {
- Temporary1 = b_33556995;
+ Temporary1 = b_p1;
}
- result_33556996 = Temporary1;
+ result_33557167 = Temporary1;
break BeforeRet;
- } while (false);
+ };
- return result_33556996;
+ return result_33557167;
}
-function addChar(x_33557255, c_33557256) {
- x_33557255.push(c_33557256);
+function addChar(x_p0, c_p1) {
+ x_p0.push(c_p1);
+
+
+}
+var objectID_1191182514 = [0];
+
+function setTheme(theme_p0) {
+ document.documentElement.setAttribute("data-theme", theme_p0);
+ window.localStorage.setItem("theme", theme_p0);
}
-if (!Math.trunc) {
- Math.trunc = function(v) {
- v = +v;
- if (!isFinite(v)) return v;
- return (v - v % 1) || (v < 0 ? -0 : v === 0 ? v : 0);
+
+function isFatPointer__system_u2892(ti_p0) {
+ var result_33557326 = false;
+
+ BeforeRet: {
+ result_33557326 = !((ConstSet1[ti_p0.base.kind] != undefined));
+ break BeforeRet;
};
+
+ return result_33557326;
+
}
-var alternative_469762624 = [null];
+function nimCopyAux(dest_p0, src_p1, n_p2) {
+ switch (n_p2.kind) {
+ case 0:
+ break;
+ case 1:
+ dest_p0[n_p2.offset] = nimCopy(dest_p0[n_p2.offset], src_p1[n_p2.offset], n_p2.typ);
+
+ break;
+ case 2:
+ for (var i = 0; i < n_p2.sons.length; i++) {
+ nimCopyAux(dest_p0, src_p1, n_p2.sons[i]);
+ }
+
+ break;
+ case 3:
+ dest_p0[n_p2.offset] = nimCopy(dest_p0[n_p2.offset], src_p1[n_p2.offset], n_p2.typ);
+ for (var i = 0; i < n_p2.sons.length; ++i) {
+ nimCopyAux(dest_p0, src_p1, n_p2.sons[i][1]);
+ }
+
+ break;
+ }
-function add_33556419(x_33556420, x_33556420_Idx, y_33556421) {
- if (x_33556420[x_33556420_Idx] === null) { x_33556420[x_33556420_Idx] = []; }
- var off = x_33556420[x_33556420_Idx].length;
- x_33556420[x_33556420_Idx].length += y_33556421.length;
- for (var i = 0; i < y_33556421.length; ++i) {
- x_33556420[x_33556420_Idx][off+i] = y_33556421.charCodeAt(i);
+
+}
+
+function add__system_u1954(x_p0, x_p0_Idx, y_p1) {
+ if (x_p0[x_p0_Idx] === null) { x_p0[x_p0_Idx] = []; }
+ var off = x_p0[x_p0_Idx].length;
+ x_p0[x_p0_Idx].length += y_p1.length;
+ for (var i = 0; i < y_p1.length; ++i) {
+ x_p0[x_p0_Idx][off+i] = y_p1.charCodeAt(i);
}
}
-function newSeq_33556825(len_33556827) {
- var result_33556828 = [];
+function newSeq__system_u2530(len_p0) {
+ var result_33556966 = [];
+
+ result_33556966 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_33556966[i] = null; }
+ return result_33556966;
+
+}
+
+function isNimException__system_u2029() {
+ return lastJSError && lastJSError.m_type;
+
+
+}
+
+function getCurrentException() {
+ var result_33556464 = null;
+
+ if (isNimException__system_u2029()) {
+ result_33556464 = lastJSError;
+ }
+
+
+ return result_33556464;
- result_33556828 = new Array(len_33556827); for (var i = 0 ; i < len_33556827 ; ++i) { result_33556828[i] = null; }
- return result_33556828;
+}
+
+function raiseDefect() {
+ if (isNimException__system_u2029()) {
+ var e_33556678 = getCurrentException();
+ if (isObj(e_33556678.m_type, NTI33555172)) {
+ if ((excHandler == 0)) {
+ unhandledException(e_33556678);
+ }
+
+ throw e_33556678;
+ }
+
+ }
+
+
}
-function unhandledException(e_33556663) {
- var buf_33556664 = [[]];
- if (!(((e_33556663.message).length == 0))) {
- buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit("Error: unhandled exception: "));;
- buf_33556664[0].push.apply(buf_33556664[0], e_33556663.message);;
+function unhandledException(e_p0) {
+ var buf_33556672 = [[]];
+ if (!(((e_p0.message).length == 0))) {
+ buf_33556672[0].push.apply(buf_33556672[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110,58,32]);;
+ buf_33556672[0].push.apply(buf_33556672[0], e_p0.message);;
}
else {
- buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit("Error: unhandled exception"));;
+ buf_33556672[0].push.apply(buf_33556672[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110]);;
}
- buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit(" ["));;
- add_33556419(buf_33556664, 0, e_33556663.name);
- buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit("]\x0A"));;
- var cbuf_33556665 = toJSStr(buf_33556664[0]);
- framePtr = null;
+ buf_33556672[0].push.apply(buf_33556672[0], [32,91]);;
+ add__system_u1954(buf_33556672, 0, e_p0.name);
+ buf_33556672[0].push.apply(buf_33556672[0], [93,10]);;
+ var cbuf_33556673 = toJSStr(buf_33556672[0]);
if (typeof(Error) !== "undefined") {
- throw new Error(cbuf_33556665);
+ throw new Error(cbuf_33556673);
}
else {
- throw cbuf_33556665;
+ throw cbuf_33556673;
}
@@ -1050,992 +579,1140 @@ function unhandledException(e_33556663) {
}
function raiseOverflow() {
- raiseException({message: makeNimstrLit("over- or underflow"), parent: null, m_type: NTI33555122, name: null, trace: [], up: null}, "OverflowDefect");
+ raiseException({message: [111,118,101,114,45,32,111,114,32,117,110,100,101,114,102,108,111,119], parent: null, m_type: NTI134217743, name: null, trace: [], up: null}, "OverflowDefect");
}
-function checkOverflowInt(a_33556938) {
- if (a_33556938 > 2147483647 || a_33556938 < -2147483648) raiseOverflow();
+function checkOverflowInt(a_p0) {
+ if (a_p0 > 2147483647 || a_p0 < -2147483648) raiseOverflow();
}
-function isWhitespace_469762356(text_469762357) {
- return !/[^\s]/.test(text_469762357);
-
+function raiseRangeError() {
+ raiseException({message: [118,97,108,117,101,32,111,117,116,32,111,102,32,114,97,110,103,101], parent: null, m_type: NTI134217751, name: null, trace: [], up: null}, "RangeDefect");
}
-function isWhitespace_469762359(x_469762360) {
+function addChars__stdZprivateZdigitsutils_u202(result_p0, result_p0_Idx, x_p1, start_p2, n_p3) {
var Temporary1;
- var Temporary2;
- var result_469762361 = false;
+ var old_318767312 = (result_p0[result_p0_Idx]).length;
+ if (result_p0[result_p0_Idx].length < (Temporary1 = chckRange(addInt(old_318767312, n_p3), 0, 2147483647), Temporary1)) { for (var i = result_p0[result_p0_Idx].length; i < Temporary1; ++i) result_p0[result_p0_Idx].push(0); }
+ else {result_p0[result_p0_Idx].length = Temporary1; };
+ Label2: {
+ var iHEX60gensym4_318767326 = 0;
+ var i_587203799 = 0;
+ Label3: {
+ Label4: while (true) {
+ if (!(i_587203799 < n_p3)) break Label4;
+ iHEX60gensym4_318767326 = i_587203799;
+ result_p0[result_p0_Idx][chckIndx(addInt(old_318767312, iHEX60gensym4_318767326), 0, (result_p0[result_p0_Idx]).length - 1)] = x_p1.charCodeAt(chckIndx(addInt(start_p2, iHEX60gensym4_318767326), 0, (x_p1).length - 1));
+ i_587203799 = addInt(i_587203799, 1);
+ }
+ };
+ };
- if (!(x_469762360.nodeName == "#text")) Temporary2 = false; else { Temporary2 = isWhitespace_469762356(x_469762360.textContent); } if (Temporary2) Temporary1 = true; else { Temporary1 = (x_469762360.nodeName == "#comment"); } result_469762361 = Temporary1;
+
+}
- return result_469762361;
+function addChars__stdZprivateZdigitsutils_u198(result_p0, result_p0_Idx, x_p1) {
+ addChars__stdZprivateZdigitsutils_u202(result_p0, result_p0_Idx, x_p1, 0, ((x_p1) == null ? 0 : (x_p1).length));
+
}
-function raiseRangeError() {
- raiseException({message: makeNimstrLit("value out of range"), parent: null, m_type: NTI33555130, name: null, trace: [], up: null}, "RangeDefect");
+function addInt__stdZprivateZdigitsutils_u223(result_p0, result_p0_Idx, x_p1) {
+ addChars__stdZprivateZdigitsutils_u198(result_p0, result_p0_Idx, ((x_p1) + ""));
}
-function addChars_251658415(result_251658417, result_251658417_Idx, x_251658418, start_251658419, n_251658420) {
- var old_251658421 = (result_251658417[result_251658417_Idx]).length;
- (result_251658417[result_251658417_Idx].length = chckRange(addInt(old_251658421, n_251658420), 0, 2147483647));
- Label1: do {
- var iHEX60gensym4_251658435 = 0;
- var i_469762674 = 0;
- Label2: do {
- Label3: while (true) {
- if (!(i_469762674 < n_251658420)) break Label3;
- iHEX60gensym4_251658435 = i_469762674;
- result_251658417[result_251658417_Idx][chckIndx(addInt(old_251658421, iHEX60gensym4_251658435), 0, (result_251658417[result_251658417_Idx]).length - 1)] = x_251658418.charCodeAt(chckIndx(addInt(start_251658419, iHEX60gensym4_251658435), 0, (x_251658418).length - 1));
- i_469762674 = addInt(i_469762674, 1);
- }
- } while (false);
- } while (false);
+function addInt__stdZprivateZdigitsutils_u241(result_p0, result_p0_Idx, x_p1) {
+ addInt__stdZprivateZdigitsutils_u223(result_p0, result_p0_Idx, BigInt(x_p1));
}
-function addChars_251658411(result_251658413, result_251658413_Idx, x_251658414) {
- addChars_251658415(result_251658413, result_251658413_Idx, x_251658414, 0, ((x_251658414) == null ? 0 : (x_251658414).length));
+function HEX24__systemZdollars_u14(xHEX60gensym0_p0) {
+ var result_402653200 = [[]];
+
+ result_402653200[0] = nimCopy(null, [], NTI33554449);
+ addInt__stdZprivateZdigitsutils_u241(result_402653200, 0, xHEX60gensym0_p0);
+
+ return result_402653200[0];
-
}
-function addInt_251658436(result_251658437, result_251658437_Idx, x_251658438) {
- addChars_251658411(result_251658437, result_251658437_Idx, ((x_251658438) + ""));
+function raiseIndexError(i_p0, a_p1, b_p2) {
+ var Temporary1;
+
+ if ((b_p2 < a_p1)) {
+ Temporary1 = [105,110,100,101,120,32,111,117,116,32,111,102,32,98,111,117,110,100,115,44,32,116,104,101,32,99,111,110,116,97,105,110,101,114,32,105,115,32,101,109,112,116,121];
+ }
+ else {
+ Temporary1 = ([105,110,100,101,120,32]).concat(HEX24__systemZdollars_u14(i_p0),[32,110,111,116,32,105,110,32],HEX24__systemZdollars_u14(a_p1),[32,46,46,32],HEX24__systemZdollars_u14(b_p2));
+ }
+
+ raiseException({message: nimCopy(null, Temporary1, NTI33554449), parent: null, m_type: NTI134217749, name: null, trace: [], up: null}, "IndexDefect");
}
-function addInt_251658457(result_251658458, result_251658458_Idx, x_251658459) {
- addInt_251658436(result_251658458, result_251658458_Idx, x_251658459);
+function sysFatal__stdZassertions_u44(message_p1) {
+ raiseException({message: nimCopy(null, message_p1, NTI33554449), m_type: NTI134217745, parent: null, name: null, trace: [], up: null}, "AssertionDefect");
}
-function HEX24_335544323(x_335544324) {
- var result_335544325 = [[]];
+function raiseAssert__stdZassertions_u42(msg_p0) {
+ sysFatal__stdZassertions_u44(msg_p0);
- addInt_251658457(result_335544325, 0, x_335544324);
+
+}
- return result_335544325[0];
+function failedAssertImpl__stdZassertions_u84(msg_p0) {
+ raiseAssert__stdZassertions_u42(msg_p0);
+
}
-function isFatPointer_33557131(ti_33557132) {
- var result_33557133 = false;
+function onDOMLoaded(e_p0) {
+ var Temporary4;
- BeforeRet: do {
- result_33557133 = !((ConstSet1[ti_33557132.base.kind] != undefined));
- break BeforeRet;
- } while (false);
-
- return result_33557133;
+function HEX3Aanonymous__dochack_u65(event_p0) {
+ event_p0.target.parentNode.style.display = "none";
+ event_p0.target.parentNode.nextSibling.style.display = "inline";
+
}
-function nimCopyAux(dest_33557144, src_33557145, n_33557146) {
- switch (n_33557146.kind) {
- case 0:
- break;
- case 1:
- dest_33557144[n_33557146.offset] = nimCopy(dest_33557144[n_33557146.offset], src_33557145[n_33557146.offset], n_33557146.typ);
-
- break;
- case 2:
- for (var i = 0; i < n_33557146.sons.length; i++) {
- nimCopyAux(dest_33557144, src_33557145, n_33557146.sons[i]);
- }
-
- break;
- case 3:
- dest_33557144[n_33557146.offset] = nimCopy(dest_33557144[n_33557146.offset], src_33557145[n_33557146.offset], n_33557146.typ);
- for (var i = 0; i < n_33557146.sons.length; ++i) {
- nimCopyAux(dest_33557144, src_33557145, n_33557146.sons[i][1]);
- }
-
- break;
- }
+ document.getElementById("theme-select").value = window.localStorage.getItem("theme");
+ Label1: {
+ var pragmaDots_587202624 = null;
+ var colontmp__587203790 = [];
+ colontmp__587203790 = document.getElementsByClassName("pragmadots");
+ var i_587203792 = 0;
+ var L_587203793 = (colontmp__587203790).length;
+ Label2: {
+ Label3: while (true) {
+ if (!(i_587203792 < L_587203793)) break Label3;
+ pragmaDots_587202624 = colontmp__587203790[chckIndx(i_587203792, 0, (colontmp__587203790).length - 1)];
+ Temporary4 = HEX3Aanonymous__dochack_u65.bind(null); Temporary4.ClP_0 = HEX3Aanonymous__dochack_u65; Temporary4.ClE_0 = null;
+ pragmaDots_587202624.onclick = Temporary4;
+ i_587203792 += 1;
+ if (!(((colontmp__587203790).length == L_587203793))) {
+ failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
+ }
+
+ }
+ };
+ };
}
-function raiseIndexError(i_33556754, a_33556755, b_33556756) {
- var Temporary1;
+function isWhitespace__dochack_u408(x_p0) {
+ var result_587202970 = false;
- if ((b_33556756 < a_33556755)) {
- Temporary1 = makeNimstrLit("index out of bounds, the container is empty");
- }
- else {
- Temporary1 = (makeNimstrLit("index ") || []).concat(HEX24_335544323(i_33556754) || [],makeNimstrLit(" not in ") || [],HEX24_335544323(a_33556755) || [],makeNimstrLit(" .. ") || [],HEX24_335544323(b_33556756) || []);
- }
-
- raiseException({message: nimCopy(null, Temporary1, NTI33554439), parent: null, m_type: NTI33555128, name: null, trace: [], up: null}, "IndexDefect");
+ result_587202970 = (((x_p0.nodeName == "#text") && !/\S/.test(x_p0.textContent)) || (x_p0.nodeName == "#comment"));
+
+ return result_587202970;
-
}
-function toToc_469762362(x_469762363, father_469762364) {
+function toToc__dochack_u411(x_p0, father_p1) {
var Temporary5;
var Temporary6;
var Temporary7;
var Temporary8;
var Temporary15;
- if ((x_469762363.nodeName == "UL")) {
- var f_469762372 = {heading: null, kids: [], sortId: (father_469762364.kids).length, doSort: false};
- var i_469762373 = 0;
- Label1: do {
+ if ((x_p0.nodeName == "UL")) {
+ var f_587202981 = {heading: null, kids: [], sortId: (father_p1.kids).length, doSort: false};
+ var i_587202982 = 0;
+ Label1: {
Label2: while (true) {
- if (!(i_469762373 < x_469762363.childNodes.length)) break Label2;
- var nxt_469762374 = addInt(i_469762373, 1);
- Label3: do {
+ if (!(i_587202982 < x_p0.childNodes.length)) break Label2;
+ var nxt_587202983 = addInt(i_587202982, 1);
+ Label3: {
Label4: while (true) {
- if (!(nxt_469762374 < x_469762363.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace_469762359(x_469762363.childNodes[nxt_469762374]); } if (!Temporary5) break Label4;
- nxt_469762374 = addInt(nxt_469762374, 1);
+ if (!(nxt_587202983 < x_p0.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace__dochack_u408(x_p0.childNodes[nxt_587202983]); } if (!Temporary5) break Label4;
+ nxt_587202983 = addInt(nxt_587202983, 1);
}
- } while (false);
- if (!(nxt_469762374 < x_469762363.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_469762363.childNodes[i_469762373].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_469762363.childNodes[i_469762373].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_469762363.childNodes[nxt_469762374].nodeName == "UL"); } if (Temporary6) {
- var e_469762386 = {heading: x_469762363.childNodes[i_469762373].childNodes[0], kids: [], sortId: (f_469762372.kids).length, doSort: false};
- var it_469762387 = x_469762363.childNodes[nxt_469762374];
- Label9: do {
- var j_469762392 = 0;
- var colontmp__469762653 = 0;
- colontmp__469762653 = it_469762387.childNodes.length;
- var i_469762654 = 0;
- Label10: do {
+ };
+ if (!(nxt_587202983 < x_p0.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_p0.childNodes[i_587202982].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_p0.childNodes[i_587202982].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_p0.childNodes[nxt_587202983].nodeName == "UL"); } if (Temporary6) {
+ var e_587202996 = {heading: x_p0.childNodes[i_587202982].childNodes[0], kids: [], sortId: (f_587202981.kids).length, doSort: false};
+ var it_587202997 = x_p0.childNodes[nxt_587202983];
+ Label9: {
+ var j_587203002 = 0;
+ var colontmp__587203807 = 0;
+ colontmp__587203807 = it_587202997.childNodes.length;
+ var i_587203808 = 0;
+ Label10: {
Label11: while (true) {
- if (!(i_469762654 < colontmp__469762653)) break Label11;
- j_469762392 = i_469762654;
- toToc_469762362(it_469762387.childNodes[j_469762392], e_469762386);
- i_469762654 = addInt(i_469762654, 1);
+ if (!(i_587203808 < colontmp__587203807)) break Label11;
+ j_587203002 = i_587203808;
+ toToc__dochack_u411(it_587202997.childNodes[j_587203002], e_587202996);
+ i_587203808 = addInt(i_587203808, 1);
}
- } while (false);
- } while (false);
- f_469762372.kids.push(e_469762386);;
- i_469762373 = addInt(nxt_469762374, 1);
+ };
+ };
+ f_587202981.kids.push(e_587202996);;
+ i_587202982 = addInt(nxt_587202983, 1);
}
else {
- toToc_469762362(x_469762363.childNodes[i_469762373], f_469762372);
- i_469762373 = addInt(i_469762373, 1);
+ toToc__dochack_u411(x_p0.childNodes[i_587202982], f_587202981);
+ i_587202982 = addInt(i_587202982, 1);
}
}
- } while (false);
- father_469762364.kids.push(f_469762372);;
+ };
+ father_p1.kids.push(f_587202981);;
}
else {
- if (isWhitespace_469762359(x_469762363)) {
+ if (isWhitespace__dochack_u408(x_p0)) {
}
else {
- if ((x_469762363.nodeName == "LI")) {
- var idx_469762409 = [];
- Label12: do {
- var i_469762414 = 0;
- var colontmp__469762657 = 0;
- colontmp__469762657 = x_469762363.childNodes.length;
- var i_469762658 = 0;
- Label13: do {
+ if ((x_p0.nodeName == "LI")) {
+ var idx_587203020 = [];
+ Label12: {
+ var i_587203025 = 0;
+ var colontmp__587203811 = 0;
+ colontmp__587203811 = x_p0.childNodes.length;
+ var i_587203812 = 0;
+ Label13: {
Label14: while (true) {
- if (!(i_469762658 < colontmp__469762657)) break Label14;
- i_469762414 = i_469762658;
- if (!(isWhitespace_469762359(x_469762363.childNodes[i_469762414]))) {
- idx_469762409.push(i_469762414);;
+ if (!(i_587203812 < colontmp__587203811)) break Label14;
+ i_587203025 = i_587203812;
+ if (!(isWhitespace__dochack_u408(x_p0.childNodes[i_587203025]))) {
+ idx_587203020.push(i_587203025);;
}
- i_469762658 = addInt(i_469762658, 1);
+ i_587203812 = addInt(i_587203812, 1);
}
- } while (false);
- } while (false);
- if (!((idx_469762409).length == 2)) Temporary15 = false; else { Temporary15 = (x_469762363.childNodes[idx_469762409[chckIndx(1, 0, (idx_469762409).length - 1)]].nodeName == "UL"); } if (Temporary15) {
- var e_469762430 = {heading: x_469762363.childNodes[idx_469762409[chckIndx(0, 0, (idx_469762409).length - 1)]], kids: [], sortId: (father_469762364.kids).length, doSort: false};
- var it_469762431 = x_469762363.childNodes[idx_469762409[chckIndx(1, 0, (idx_469762409).length - 1)]];
- Label16: do {
- var j_469762436 = 0;
- var colontmp__469762661 = 0;
- colontmp__469762661 = it_469762431.childNodes.length;
- var i_469762662 = 0;
- Label17: do {
+ };
+ };
+ if (!((idx_587203020).length == 2)) Temporary15 = false; else { Temporary15 = (x_p0.childNodes[idx_587203020[chckIndx(1, 0, (idx_587203020).length - 1)]].nodeName == "UL"); } if (Temporary15) {
+ var e_587203041 = {heading: x_p0.childNodes[idx_587203020[chckIndx(0, 0, (idx_587203020).length - 1)]], kids: [], sortId: (father_p1.kids).length, doSort: false};
+ var it_587203042 = x_p0.childNodes[idx_587203020[chckIndx(1, 0, (idx_587203020).length - 1)]];
+ Label16: {
+ var j_587203047 = 0;
+ var colontmp__587203815 = 0;
+ colontmp__587203815 = it_587203042.childNodes.length;
+ var i_587203816 = 0;
+ Label17: {
Label18: while (true) {
- if (!(i_469762662 < colontmp__469762661)) break Label18;
- j_469762436 = i_469762662;
- toToc_469762362(it_469762431.childNodes[j_469762436], e_469762430);
- i_469762662 = addInt(i_469762662, 1);
+ if (!(i_587203816 < colontmp__587203815)) break Label18;
+ j_587203047 = i_587203816;
+ toToc__dochack_u411(it_587203042.childNodes[j_587203047], e_587203041);
+ i_587203816 = addInt(i_587203816, 1);
}
- } while (false);
- } while (false);
- father_469762364.kids.push(e_469762430);;
+ };
+ };
+ father_p1.kids.push(e_587203041);;
}
else {
- Label19: do {
- var i_469762445 = 0;
- var colontmp__469762665 = 0;
- colontmp__469762665 = x_469762363.childNodes.length;
- var i_469762666 = 0;
- Label20: do {
+ Label19: {
+ var i_587203056 = 0;
+ var colontmp__587203819 = 0;
+ colontmp__587203819 = x_p0.childNodes.length;
+ var i_587203820 = 0;
+ Label20: {
Label21: while (true) {
- if (!(i_469762666 < colontmp__469762665)) break Label21;
- i_469762445 = i_469762666;
- toToc_469762362(x_469762363.childNodes[i_469762445], father_469762364);
- i_469762666 = addInt(i_469762666, 1);
+ if (!(i_587203820 < colontmp__587203819)) break Label21;
+ i_587203056 = i_587203820;
+ toToc__dochack_u411(x_p0.childNodes[i_587203056], father_p1);
+ i_587203820 = addInt(i_587203820, 1);
}
- } while (false);
- } while (false);
+ };
+ };
}
}
else {
- father_469762364.kids.push({heading: x_469762363, kids: [], sortId: (father_469762364.kids).length, doSort: false});;
+ father_p1.kids.push({heading: x_p0, kids: [], sortId: (father_p1.kids).length, doSort: false});;
}
}}
}
-function extractItems_469762182(x_469762183, heading_469762184, items_469762185, items_469762185_Idx) {
- var Temporary1;
-
- BeforeRet: do {
- if ((x_469762183 == null)) {
+function extractItems__dochack_u199(x_p0, heading_p1, items_p2, items_p2_Idx) {
+ BeforeRet: {
+ if ((x_p0 == null)) {
break BeforeRet;
}
- if (!!((x_469762183.heading == null))) Temporary1 = false; else { Temporary1 = (x_469762183.heading.textContent == heading_469762184); } if (Temporary1) {
- Label2: do {
- var i_469762202 = 0;
- var colontmp__469762677 = 0;
- colontmp__469762677 = (x_469762183.kids).length;
- var i_469762678 = 0;
- Label3: do {
- Label4: while (true) {
- if (!(i_469762678 < colontmp__469762677)) break Label4;
- i_469762202 = i_469762678;
- items_469762185[items_469762185_Idx].push(x_469762183.kids[chckIndx(i_469762202, 0, (x_469762183.kids).length - 1)].heading);;
- i_469762678 = addInt(i_469762678, 1);
+ if ((!((x_p0.heading == null)) && (x_p0.heading.textContent == heading_p1))) {
+ Label1: {
+ var i_587202779 = 0;
+ var colontmp__587203823 = 0;
+ colontmp__587203823 = (x_p0.kids).length;
+ var i_587203824 = 0;
+ Label2: {
+ Label3: while (true) {
+ if (!(i_587203824 < colontmp__587203823)) break Label3;
+ i_587202779 = i_587203824;
+ items_p2[items_p2_Idx].push(x_p0.kids[chckIndx(i_587202779, 0, (x_p0.kids).length - 1)].heading);;
+ i_587203824 = addInt(i_587203824, 1);
}
- } while (false);
- } while (false);
+ };
+ };
}
else {
- Label5: do {
- var i_469762214 = 0;
- var colontmp__469762681 = 0;
- colontmp__469762681 = (x_469762183.kids).length;
- var i_469762682 = 0;
- Label6: do {
- Label7: while (true) {
- if (!(i_469762682 < colontmp__469762681)) break Label7;
- i_469762214 = i_469762682;
- var it_469762215 = x_469762183.kids[chckIndx(i_469762214, 0, (x_469762183.kids).length - 1)];
- extractItems_469762182(it_469762215, heading_469762184, items_469762185, items_469762185_Idx);
- i_469762682 = addInt(i_469762682, 1);
+ Label4: {
+ var k_587202805 = null;
+ var i_587203828 = 0;
+ var L_587203829 = (x_p0.kids).length;
+ Label5: {
+ Label6: while (true) {
+ if (!(i_587203828 < L_587203829)) break Label6;
+ k_587202805 = x_p0.kids[chckIndx(i_587203828, 0, (x_p0.kids).length - 1)];
+ extractItems__dochack_u199(k_587202805, heading_p1, items_p2, items_p2_Idx);
+ i_587203828 += 1;
+ if (!(((x_p0.kids).length == L_587203829))) {
+ failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
+ }
+
}
- } while (false);
- } while (false);
+ };
+ };
}
- } while (false);
+ };
}
-function tree_469762055(tag_469762056, kids_469762057) {
- var result_469762058 = null;
+function tree__dochack_u130(tag_p0, kids_p1) {
+ var result_587202693 = null;
- result_469762058 = document.createElement(toJSStr(tag_469762056));
- Label1: do {
- var k_469762071 = null;
- var i_469762695 = 0;
- Label2: do {
+ result_587202693 = document.createElement(tag_p0);
+ Label1: {
+ var k_587202707 = null;
+ var i_587203841 = 0;
+ Label2: {
Label3: while (true) {
- if (!(i_469762695 < (kids_469762057).length)) break Label3;
- k_469762071 = kids_469762057[chckIndx(i_469762695, 0, (kids_469762057).length - 1)];
- result_469762058.appendChild(k_469762071);
- i_469762695 = addInt(i_469762695, 1);
+ if (!(i_587203841 < (kids_p1).length)) break Label3;
+ k_587202707 = kids_p1[chckIndx(i_587203841, 0, (kids_p1).length - 1)];
+ result_587202693.appendChild(k_587202707);
+ i_587203841 += 1;
}
- } while (false);
- } while (false);
-
- return result_469762058;
-
-}
-
-function text_469762109(s_469762110) {
- var result_469762111 = null;
+ };
+ };
- result_469762111 = document.createTextNode(s_469762110);
-
- return result_469762111;
+ return result_587202693;
}
-function sysFatal_218103842(message_218103845) {
- raiseException({message: nimCopy(null, message_218103845, NTI33554439), m_type: NTI33555124, parent: null, name: null, trace: [], up: null}, "AssertionDefect");
+function text__dochack_u155(s_p0) {
+ var result_587202717 = null;
-
-}
+ result_587202717 = document.createTextNode(s_p0);
-function raiseAssert_218103840(msg_218103841) {
- sysFatal_218103842(msg_218103841);
+ return result_587202717;
-
}
-function failedAssertImpl_218103864(msg_218103865) {
- raiseAssert_218103840(msg_218103865);
-
-
-}
-
-function uncovered_469762493(x_469762494) {
- var Temporary1;
- var Temporary2;
+function uncovered__dochack_u600(x_p0) {
+ var Temporary1;
- var result_469762495 = null;
+ var result_587203162 = null;
- BeforeRet: do {
- if (!((x_469762494.kids).length == 0)) Temporary1 = false; else { Temporary1 = !((x_469762494.heading == null)); } if (Temporary1) {
- if (!(x_469762494.heading.hasOwnProperty('__karaxMarker__'))) {
- Temporary2 = x_469762494;
+ BeforeRet: {
+ if ((((x_p0.kids).length == 0) && !((x_p0.heading == null)))) {
+ if (!(x_p0.heading.hasOwnProperty('__karaxMarker__'))) {
+ Temporary1 = x_p0;
}
else {
- Temporary2 = null;
+ Temporary1 = null;
}
- result_469762495 = Temporary2;
+ result_587203162 = Temporary1;
break BeforeRet;
}
- result_469762495 = {heading: x_469762494.heading, kids: [], sortId: x_469762494.sortId, doSort: x_469762494.doSort};
- Label3: do {
- var i_469762514 = 0;
- var colontmp__469762702 = 0;
- colontmp__469762702 = (x_469762494.kids).length;
- var i_469762703 = 0;
- Label4: do {
- Label5: while (true) {
- if (!(i_469762703 < colontmp__469762702)) break Label5;
- i_469762514 = i_469762703;
- var y_469762515 = uncovered_469762493(x_469762494.kids[chckIndx(i_469762514, 0, (x_469762494.kids).length - 1)]);
- if (!((y_469762515 == null))) {
- result_469762495.kids.push(y_469762515);;
+ result_587203162 = {heading: x_p0.heading, kids: [], sortId: x_p0.sortId, doSort: x_p0.doSort};
+ Label2: {
+ var k_587203177 = null;
+ var i_587203848 = 0;
+ var L_587203849 = (x_p0.kids).length;
+ Label3: {
+ Label4: while (true) {
+ if (!(i_587203848 < L_587203849)) break Label4;
+ k_587203177 = x_p0.kids[chckIndx(i_587203848, 0, (x_p0.kids).length - 1)];
+ var y_587203178 = uncovered__dochack_u600(k_587203177);
+ if (!((y_587203178 == null))) {
+ result_587203162.kids.push(y_587203178);;
+ }
+
+ i_587203848 += 1;
+ if (!(((x_p0.kids).length == L_587203849))) {
+ failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
- i_469762703 = addInt(i_469762703, 1);
}
- } while (false);
- } while (false);
- if (((result_469762495.kids).length == 0)) {
- result_469762495 = null;
+ };
+ };
+ if (((result_587203162.kids).length == 0)) {
+ result_587203162 = null;
}
- } while (false);
+ };
- return result_469762495;
+ return result_587203162;
}
-function mergeTocs_469762527(orig_469762528, news_469762529) {
- var result_469762530 = null;
+function mergeTocs__dochack_u630(orig_p0, news_p1) {
+ var result_587203193 = null;
- result_469762530 = uncovered_469762493(orig_469762528);
- if ((result_469762530 == null)) {
- result_469762530 = news_469762529;
+ result_587203193 = uncovered__dochack_u600(orig_p0);
+ if ((result_587203193 == null)) {
+ result_587203193 = news_p1;
}
else {
- Label1: do {
- var i_469762542 = 0;
- var colontmp__469762698 = 0;
- colontmp__469762698 = (news_469762529.kids).length;
- var i_469762699 = 0;
- Label2: do {
+ Label1: {
+ var i_587203205 = 0;
+ var colontmp__587203844 = 0;
+ colontmp__587203844 = (news_p1.kids).length;
+ var i_587203845 = 0;
+ Label2: {
Label3: while (true) {
- if (!(i_469762699 < colontmp__469762698)) break Label3;
- i_469762542 = i_469762699;
- result_469762530.kids.push(news_469762529.kids[chckIndx(i_469762542, 0, (news_469762529.kids).length - 1)]);;
- i_469762699 = addInt(i_469762699, 1);
+ if (!(i_587203845 < colontmp__587203844)) break Label3;
+ i_587203205 = i_587203845;
+ result_587203193.kids.push(news_p1.kids[chckIndx(i_587203205, 0, (news_p1.kids).length - 1)]);;
+ i_587203845 = addInt(i_587203845, 1);
}
- } while (false);
- } while (false);
+ };
+ };
}
- return result_469762530;
+ return result_587203193;
}
-function buildToc_469762547(orig_469762548, types_469762549, procs_469762550) {
- var Temporary7;
-
- var result_469762551 = null;
+function buildToc__dochack_u650(orig_p0, types_p1, procs_p2) {
+ var result_587203214 = null;
- var newStuff_469762556 = {heading: null, kids: [], doSort: true, sortId: 0};
- Label1: do {
- var t_469762578 = null;
- var i_469762690 = 0;
- var L_469762691 = (types_469762549).length;
- Label2: do {
+ var newStuff_587203219 = {heading: null, kids: [], doSort: true, sortId: 0};
+ Label1: {
+ var t_587203223 = null;
+ var i_587203836 = 0;
+ var L_587203837 = (types_p1).length;
+ Label2: {
Label3: while (true) {
- if (!(i_469762690 < L_469762691)) break Label3;
- t_469762578 = types_469762549[chckIndx(i_469762690, 0, (types_469762549).length - 1)];
- var c_469762583 = {heading: t_469762578.cloneNode(true), kids: [], doSort: true, sortId: 0};
- t_469762578.__karaxMarker__ = true;
- Label4: do {
- var p_469762587 = null;
- var i_469762687 = 0;
- var L_469762688 = (procs_469762550).length;
- Label5: do {
+ if (!(i_587203836 < L_587203837)) break Label3;
+ t_587203223 = types_p1[chckIndx(i_587203836, 0, (types_p1).length - 1)];
+ var c_587203228 = {heading: t_587203223.cloneNode(true), kids: [], doSort: true, sortId: 0};
+ t_587203223.__karaxMarker__ = true;
+ Label4: {
+ var p_587203232 = null;
+ var i_587203833 = 0;
+ var L_587203834 = (procs_p2).length;
+ Label5: {
Label6: while (true) {
- if (!(i_469762687 < L_469762688)) break Label6;
- p_469762587 = procs_469762550[chckIndx(i_469762687, 0, (procs_469762550).length - 1)];
- if (!(p_469762587.hasOwnProperty('__karaxMarker__'))) {
- var xx_469762588 = p_469762587.parentNode.getElementsByClassName("attachedType");
- if (!((xx_469762588).length == 1)) Temporary7 = false; else { Temporary7 = (xx_469762588[chckIndx(0, 0, (xx_469762588).length - 1)].textContent == t_469762578.textContent); } if (Temporary7) {
- var q_469762593 = tree_469762055(makeNimstrLit("A"), [text_469762109(p_469762587.title)]);
- q_469762593.setAttribute("href", p_469762587.getAttribute("href"));
- c_469762583.kids.push({heading: q_469762593, kids: [], sortId: 0, doSort: false});;
- p_469762587.__karaxMarker__ = true;
+ if (!(i_587203833 < L_587203834)) break Label6;
+ p_587203232 = procs_p2[chckIndx(i_587203833, 0, (procs_p2).length - 1)];
+ if (!(p_587203232.hasOwnProperty('__karaxMarker__'))) {
+ var xx_587203233 = p_587203232.parentNode.getElementsByClassName("attachedType");
+ if ((((xx_587203233).length == 1) && (xx_587203233[chckIndx(0, 0, (xx_587203233).length - 1)].textContent == t_587203223.textContent))) {
+ var q_587203238 = tree__dochack_u130("A", [text__dochack_u155(p_587203232.title)]);
+ q_587203238.setAttribute("href", p_587203232.getAttribute("href"));
+ c_587203228.kids.push({heading: q_587203238, kids: [], sortId: 0, doSort: false});;
+ p_587203232.__karaxMarker__ = true;
}
}
- i_469762687 = addInt(i_469762687, 1);
- if (!(((procs_469762550).length == L_469762688))) {
- failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it"));
+ i_587203833 += 1;
+ if (!(((procs_p2).length == L_587203834))) {
+ failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
- } while (false);
- } while (false);
- newStuff_469762556.kids.push(c_469762583);;
- i_469762690 = addInt(i_469762690, 1);
- if (!(((types_469762549).length == L_469762691))) {
- failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it"));
+ };
+ };
+ newStuff_587203219.kids.push(c_587203228);;
+ i_587203836 += 1;
+ if (!(((types_p1).length == L_587203837))) {
+ failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
- } while (false);
- } while (false);
- result_469762551 = mergeTocs_469762527(orig_469762548, newStuff_469762556);
+ };
+ };
+ result_587203214 = mergeTocs__dochack_u630(orig_p0, newStuff_587203219);
- return result_469762551;
+ return result_587203214;
}
-function add_469762099(parent_469762100, kid_469762101) {
- var Temporary1;
- var Temporary2;
-
- if (!(parent_469762100.nodeName == "TR")) Temporary1 = false; else { if ((kid_469762101.nodeName == "TD")) Temporary2 = true; else { Temporary2 = (kid_469762101.nodeName == "TH"); } Temporary1 = Temporary2; } if (Temporary1) {
- var k_469762102 = document.createElement("TD");
- k_469762102.appendChild(kid_469762101);
- parent_469762100.appendChild(k_469762102);
+function add__dochack_u148(parent_p0, kid_p1) {
+ if (((parent_p0.nodeName == "TR") && ((kid_p1.nodeName == "TD") || (kid_p1.nodeName == "TH")))) {
+ var k_587202711 = document.createElement("TD");
+ k_587202711.appendChild(kid_p1);
+ parent_p0.appendChild(k_587202711);
}
else {
- parent_469762100.appendChild(kid_469762101);
+ parent_p0.appendChild(kid_p1);
}
}
-function setClass_469762103(e_469762104, value_469762105) {
- e_469762104.setAttribute("class", toJSStr(value_469762105));
+function setClass__dochack_u152(e_p0, value_p1) {
+ e_p0.setAttribute("class", value_p1);
}
-function toHtml_469762225(x_469762226, isRoot_469762227) {
- var Temporary1;
-
-function HEX3Aanonymous_469762245(a_469762246, b_469762247) {
- var Temporary1;
-
- var result_469762248 = 0;
-
- BeforeRet: do {
- if (!!((a_469762246.heading == null))) Temporary1 = false; else { Temporary1 = !((b_469762247.heading == null)); } if (Temporary1) {
- var x_469762257 = a_469762246.heading.textContent;
- var y_469762258 = b_469762247.heading.textContent;
- if ((x_469762257 < y_469762258)) {
- result_469762248 = -1;
- break BeforeRet;
- }
-
- if ((y_469762258 < x_469762257)) {
- result_469762248 = 1;
- break BeforeRet;
- }
-
- result_469762248 = 0;
- break BeforeRet;
- }
- else {
- result_469762248 = subInt(a_469762246.sortId, b_469762247.sortId);
- break BeforeRet;
- }
-
- } while (false);
+function toHtml__dochack_u278(x_p0, isRoot_p1) {
+ var Temporary1;
- return result_469762248;
+function HEX3Aanonymous__dochack_u298(a_p0, b_p1) {
+ var result_587202861 = 0;
+ BeforeRet: {
+ if ((!((a_p0.heading == null)) && !((b_p1.heading == null)))) {
+ var x_587202870 = a_p0.heading.textContent;
+ var y_587202871 = b_p1.heading.textContent;
+ if ((x_587202870 < y_587202871)) {
+ result_587202861 = (-1);
+ break BeforeRet;
}
+
+ if ((y_587202871 < x_587202870)) {
+ result_587202861 = 1;
+ break BeforeRet;
+ }
+
+ result_587202861 = 0;
+ break BeforeRet;
+ }
+ else {
+ result_587202861 = subInt(a_p0.sortId, b_p1.sortId);
+ break BeforeRet;
+ }
+
+ };
- var result_469762228 = null;
+ return result_587202861;
- BeforeRet: do {
- if ((x_469762226 == null)) {
- result_469762228 = null;
+}
+
+ var result_587202841 = null;
+
+ BeforeRet: {
+ if ((x_p0 == null)) {
+ result_587202841 = null;
break BeforeRet;
}
- if (((x_469762226.kids).length == 0)) {
- if ((x_469762226.heading == null)) {
- result_469762228 = null;
+ if (((x_p0.kids).length == 0)) {
+ if ((x_p0.heading == null)) {
+ result_587202841 = null;
break BeforeRet;
}
- result_469762228 = x_469762226.heading.cloneNode(true);
+ result_587202841 = x_p0.heading.cloneNode(true);
break BeforeRet;
}
- result_469762228 = tree_469762055(makeNimstrLit("DIV"), []);
- if (!!((x_469762226.heading == null))) Temporary1 = false; else { Temporary1 = !(x_469762226.heading.hasOwnProperty('__karaxMarker__')); } if (Temporary1) {
- add_469762099(result_469762228, x_469762226.heading.cloneNode(true));
+ result_587202841 = tree__dochack_u130("DIV", []);
+ if ((!((x_p0.heading == null)) && !(x_p0.heading.hasOwnProperty('__karaxMarker__')))) {
+ add__dochack_u148(result_587202841, x_p0.heading.cloneNode(true));
}
- var ul_469762244 = tree_469762055(makeNimstrLit("UL"), []);
- if (isRoot_469762227) {
- setClass_469762103(ul_469762244, makeNimstrLit("simple simple-toc"));
+ var ul_587202857 = tree__dochack_u130("UL", []);
+ if (isRoot_p1) {
+ setClass__dochack_u152(ul_587202857, "simple simple-toc");
}
else {
- setClass_469762103(ul_469762244, makeNimstrLit("simple"));
+ setClass__dochack_u152(ul_587202857, "simple");
}
- if (x_469762226.doSort) {
- x_469762226.kids.sort(HEX3Aanonymous_469762245);
+ if (x_p0.doSort) {
+ Temporary1 = HEX3Aanonymous__dochack_u298.bind(null); Temporary1.ClP_0 = HEX3Aanonymous__dochack_u298; Temporary1.ClE_0 = null;
+ x_p0.kids.sort(Temporary1);
}
- Label2: do {
- var k_469762287 = null;
- var i_469762707 = 0;
- var L_469762708 = (x_469762226.kids).length;
- Label3: do {
+ Label2: {
+ var k_587202883 = null;
+ var i_587203852 = 0;
+ var L_587203853 = (x_p0.kids).length;
+ Label3: {
Label4: while (true) {
- if (!(i_469762707 < L_469762708)) break Label4;
- k_469762287 = x_469762226.kids[chckIndx(i_469762707, 0, (x_469762226.kids).length - 1)];
- var y_469762288 = toHtml_469762225(k_469762287, false);
- if (!((y_469762288 == null))) {
- add_469762099(ul_469762244, tree_469762055(makeNimstrLit("LI"), [y_469762288]));
+ if (!(i_587203852 < L_587203853)) break Label4;
+ k_587202883 = x_p0.kids[chckIndx(i_587203852, 0, (x_p0.kids).length - 1)];
+ var y_587202884 = toHtml__dochack_u278(k_587202883, false);
+ if (!((y_587202884 == null))) {
+ add__dochack_u148(ul_587202857, tree__dochack_u130("LI", [y_587202884]));
}
- i_469762707 = addInt(i_469762707, 1);
- if (!(((x_469762226.kids).length == L_469762708))) {
- failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it"));
+ i_587203852 += 1;
+ if (!(((x_p0.kids).length == L_587203853))) {
+ failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
- } while (false);
- } while (false);
- if (!((ul_469762244.childNodes.length == 0))) {
- add_469762099(result_469762228, ul_469762244);
+ };
+ };
+ if (!((ul_587202857.childNodes.length == 0))) {
+ add__dochack_u148(result_587202841, ul_587202857);
}
- if ((result_469762228.childNodes.length == 0)) {
- result_469762228 = null;
+ if ((result_587202841.childNodes.length == 0)) {
+ result_587202841 = null;
}
- } while (false);
+ };
- return result_469762228;
+ return result_587202841;
}
-function replaceById_469762114(id_469762115, newTree_469762116) {
- var x_469762117 = document.getElementById(id_469762115);
- x_469762117.parentNode.replaceChild(newTree_469762116, x_469762117);
- newTree_469762116.id = id_469762115;
+function replaceById__dochack_u158(id_p0, newTree_p1) {
+ var x_587202721 = document.getElementById(id_p0);
+ x_587202721.parentNode.replaceChild(newTree_p1, x_587202721);
+ newTree_p1.id = id_p0;
}
-function togglevis_469762625(d_469762626) {
- if (d_469762626.style.display == 'none')
- d_469762626.style.display = 'inline';
- else
- d_469762626.style.display = 'none';
-
+function togglevis__dochack_u708(d_p0) {
+ if ((d_p0.style.display == "none")) {
+ d_p0.style.display = "inline";
+ }
+ else {
+ d_p0.style.display = "none";
+ }
+
}
-function groupBy(value_469762628) {
- var toc_469762629 = document.getElementById("toc-list");
- if ((alternative_469762624[0] == null)) {
- var tt_469762637 = {heading: null, kids: [], sortId: 0, doSort: false};
- toToc_469762362(toc_469762629, tt_469762637);
- tt_469762637 = tt_469762637.kids[chckIndx(0, 0, (tt_469762637.kids).length - 1)];
- var types_469762642 = [[]];
- var procs_469762647 = [[]];
- extractItems_469762182(tt_469762637, "Types", types_469762642, 0);
- extractItems_469762182(tt_469762637, "Procs", procs_469762647, 0);
- extractItems_469762182(tt_469762637, "Converters", procs_469762647, 0);
- extractItems_469762182(tt_469762637, "Methods", procs_469762647, 0);
- extractItems_469762182(tt_469762637, "Templates", procs_469762647, 0);
- extractItems_469762182(tt_469762637, "Macros", procs_469762647, 0);
- extractItems_469762182(tt_469762637, "Iterators", procs_469762647, 0);
- var ntoc_469762648 = buildToc_469762547(tt_469762637, types_469762642[0], procs_469762647[0]);
- var x_469762649 = toHtml_469762225(ntoc_469762648, true);
- alternative_469762624[0] = tree_469762055(makeNimstrLit("DIV"), [x_469762649]);
+function groupBy(value_p0) {
+ var toc_587203272 = document.getElementById("toc-list");
+ if ((alternative_587203267[0] == null)) {
+ var tt_587203280 = {heading: null, kids: [], sortId: 0, doSort: false};
+ toToc__dochack_u411(toc_587203272, tt_587203280);
+ tt_587203280 = tt_587203280.kids[chckIndx(0, 0, (tt_587203280.kids).length - 1)];
+ var types_587203285 = [[]];
+ var procs_587203290 = [[]];
+ extractItems__dochack_u199(tt_587203280, "Types", types_587203285, 0);
+ extractItems__dochack_u199(tt_587203280, "Procs", procs_587203290, 0);
+ extractItems__dochack_u199(tt_587203280, "Converters", procs_587203290, 0);
+ extractItems__dochack_u199(tt_587203280, "Methods", procs_587203290, 0);
+ extractItems__dochack_u199(tt_587203280, "Templates", procs_587203290, 0);
+ extractItems__dochack_u199(tt_587203280, "Macros", procs_587203290, 0);
+ extractItems__dochack_u199(tt_587203280, "Iterators", procs_587203290, 0);
+ var ntoc_587203291 = buildToc__dochack_u650(tt_587203280, types_587203285[0], procs_587203290[0]);
+ var x_587203292 = toHtml__dochack_u278(ntoc_587203291, true);
+ alternative_587203267[0] = tree__dochack_u130("DIV", [x_587203292]);
}
- if ((value_469762628 == "type")) {
- replaceById_469762114("tocRoot", alternative_469762624[0]);
+ if ((value_p0 == "type")) {
+ replaceById__dochack_u158("tocRoot", alternative_587203267[0]);
}
else {
- replaceById_469762114("tocRoot", tree_469762055(makeNimstrLit("DIV"), []));
+ replaceById__dochack_u158("tocRoot", tree__dochack_u130("DIV", []));
}
- togglevis_469762625(document.getElementById("toc-list"));
+ togglevis__dochack_u708(document.getElementById("toc-list"));
}
-var db_469762710 = [[]];
-var contents_469762711 = [[]];
-var oldtoc_469762858 = [null];
-var timer_469762859 = [null];
-function nsuToLowerAsciiChar(c_637534276) {
- var result_637534277 = 0;
+function HEX5BHEX5D__pureZstrutils_u1308(s_p0, x_p1) {
+ var result_754976033 = [];
+
+ var a_754976035 = x_p1.a;
+ var L_754976037 = addInt(subInt(subInt((s_p0).length, x_p1.b), a_754976035), 1);
+ result_754976033 = nimCopy(null, mnewString(chckRange(L_754976037, 0, 2147483647)), NTI33554449);
+ Label1: {
+ var i_754976042 = 0;
+ var i_587203862 = 0;
+ Label2: {
+ Label3: while (true) {
+ if (!(i_587203862 < L_754976037)) break Label3;
+ i_754976042 = i_587203862;
+ result_754976033[chckIndx(i_754976042, 0, (result_754976033).length - 1)] = s_p0[chckIndx(addInt(i_754976042, a_754976035), 0, (s_p0).length - 1)];
+ i_587203862 = addInt(i_587203862, 1);
+ }
+ };
+ };
+
+ return result_754976033;
+
+}
+
+function HEX2EHEX2E__stdZenumutils_u105(a_p0, b_p1) {
+ var result_973078640 = ({a: 0, b: 0});
+
+ result_973078640 = nimCopy(result_973078640, {a: a_p0, b: b_p1}, NTI973078615);
+
+ return result_973078640;
+
+}
+async function loadIndex__dochack_u928() {
+ var result_587203490 = null;
+
+ BeforeRet: {
+ var indexURL_587203496 = document.getElementById("indexLink").getAttribute("href");
+ var rootURL_587203522 = HEX5BHEX5D__pureZstrutils_u1308(cstrToNimstr(indexURL_587203496), HEX2EHEX2E__stdZenumutils_u105(0, 14));
+ var resp_587203534 = (await (await fetch(indexURL_587203496)).text());
+ var indexElem_587203535 = document.createElement("div");
+ indexElem_587203535.innerHTML = resp_587203534;
+ Label1: {
+ var href_587203557 = null;
+ var colontmp__587203856 = [];
+ colontmp__587203856 = indexElem_587203535.getElementsByClassName("reference");
+ var i_587203858 = 0;
+ var L_587203859 = (colontmp__587203856).length;
+ Label2: {
+ Label3: while (true) {
+ if (!(i_587203858 < L_587203859)) break Label3;
+ href_587203557 = colontmp__587203856[chckIndx(i_587203858, 0, (colontmp__587203856).length - 1)];
+ href_587203557.setAttribute("href", toJSStr((rootURL_587203522).concat(cstrToNimstr(href_587203557.getAttribute("href")))));
+ db_587203309[0].push(href_587203557);;
+ contents_587203310[0].push(href_587203557.getAttribute("data-doc-search-tag"));;
+ i_587203858 += 1;
+ if (!(((colontmp__587203856).length == L_587203859))) {
+ failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
+ }
+
+ }
+ };
+ };
+ result_587203490 = undefined;
+ break BeforeRet;
+ };
+
+ return result_587203490;
+
+}
+
+function then__dochack_u1107(future_p0, onSuccess_p1, onReject_p2) {
+ var result_587203673 = null;
+
+ BeforeRet: {
+ var ret_587203683 = null;
+ ret_587203683 = future_p0.then(onSuccess_p1, onReject_p2);
+ result_587203673 = ret_587203683;
+ break BeforeRet;
+ };
+
+ return result_587203673;
+
+}
+
+function nsuToLowerAsciiChar(c_p0) {
+ var result_754974807 = 0;
- if ((ConstSet2[c_637534276] != undefined)) {
- result_637534277 = (c_637534276 ^ 32);
+ if ((ConstSet2[c_p0] != undefined)) {
+ result_754974807 = (c_p0 ^ 32);
}
else {
- result_637534277 = c_637534276;
+ result_754974807 = c_p0;
}
- return result_637534277;
+ return result_754974807;
}
-function fuzzyMatch_620757008(pattern_620757009, str_620757010) {
+function fuzzyMatch__fuzzysearch_u16(pattern_p0, str_p1) {
var Temporary4;
var Temporary5;
var Temporary6;
var Temporary7;
var Temporary8;
- var result_620757013 = {Field0: 0, Field1: false};
+ var result_738197525 = {Field0: 0, Field1: false};
- var scoreState_620757014 = -100;
- var headerMatched_620757015 = false;
- var unmatchedLeadingCharCount_620757016 = 0;
- var consecutiveMatchCount_620757017 = 0;
- var strIndex_620757018 = 0;
- var patIndex_620757019 = 0;
- var score_620757020 = 0;
- Label1: do {
+ var scoreState_738197526 = (-100);
+ var headerMatched_738197527 = false;
+ var unmatchedLeadingCharCount_738197528 = 0;
+ var consecutiveMatchCount_738197529 = 0;
+ var strIndex_738197530 = 0;
+ var patIndex_738197531 = 0;
+ var score_738197532 = 0;
+ Label1: {
Label2: while (true) {
- if (!((strIndex_620757018 < ((str_620757010) == null ? 0 : (str_620757010).length)) && (patIndex_620757019 < ((pattern_620757009) == null ? 0 : (pattern_620757009).length)))) break Label2;
- Label3: do {
- var patternChar_620757023 = nsuToLowerAsciiChar(pattern_620757009.charCodeAt(chckIndx(patIndex_620757019, 0, (pattern_620757009).length - 1)));
- var strChar_620757024 = nsuToLowerAsciiChar(str_620757010.charCodeAt(chckIndx(strIndex_620757018, 0, (str_620757010).length - 1)));
- if ((ConstSet3[patternChar_620757023] != undefined)) {
- patIndex_620757019 = addInt(patIndex_620757019, 1);
+ if (!((strIndex_738197530 < ((str_p1) == null ? 0 : (str_p1).length)) && (patIndex_738197531 < ((pattern_p0) == null ? 0 : (pattern_p0).length)))) break Label2;
+ Label3: {
+ var patternChar_738197535 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(patIndex_738197531, 0, (pattern_p0).length - 1)));
+ var strChar_738197536 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(strIndex_738197530, 0, (str_p1).length - 1)));
+ if ((ConstSet3[patternChar_738197535] != undefined)) {
+ patIndex_738197531 = addInt(patIndex_738197531, 1);
break Label3;
}
- if ((ConstSet4[strChar_620757024] != undefined)) {
- strIndex_620757018 = addInt(strIndex_620757018, 1);
+ if ((ConstSet4[strChar_738197536] != undefined)) {
+ strIndex_738197530 = addInt(strIndex_738197530, 1);
break Label3;
}
- if ((!(headerMatched_620757015) && (strChar_620757024 == 58))) {
- headerMatched_620757015 = true;
- scoreState_620757014 = -100;
- score_620757020 = ((Math.floor((0.5 * score_620757020))) | 0);
- patIndex_620757019 = 0;
- strIndex_620757018 = addInt(strIndex_620757018, 1);
+ if ((!(headerMatched_738197527) && (strChar_738197536 == 58))) {
+ headerMatched_738197527 = true;
+ scoreState_738197526 = (-100);
+ score_738197532 = chckRange(Number(BigInt(Math.trunc(Math.floor((0.5 * score_738197532))))), (-2147483648), 2147483647);
+ patIndex_738197531 = 0;
+ strIndex_738197530 = addInt(strIndex_738197530, 1);
break Label3;
}
- if ((strChar_620757024 == patternChar_620757023)) {
- switch (scoreState_620757014) {
- case -100:
+ if ((strChar_738197536 == patternChar_738197535)) {
+ switch (scoreState_738197526) {
+ case (-100):
case 20:
- scoreState_620757014 = 10;
+ scoreState_738197526 = 10;
break;
case 0:
- scoreState_620757014 = 5;
- score_620757020 = addInt(score_620757020, scoreState_620757014);
+ scoreState_738197526 = 5;
+ score_738197532 = addInt(score_738197532, scoreState_738197526);
break;
case 10:
case 5:
- consecutiveMatchCount_620757017 = addInt(consecutiveMatchCount_620757017, 1);
- scoreState_620757014 = 5;
- score_620757020 = addInt(score_620757020, mulInt(5, consecutiveMatchCount_620757017));
- if ((scoreState_620757014 == 10)) {
- score_620757020 = addInt(score_620757020, 10);
+ consecutiveMatchCount_738197529 = addInt(consecutiveMatchCount_738197529, 1);
+ scoreState_738197526 = 5;
+ score_738197532 = addInt(score_738197532, mulInt(5, consecutiveMatchCount_738197529));
+ if ((scoreState_738197526 == 10)) {
+ score_738197532 = addInt(score_738197532, 10);
}
- var onBoundary_620757076 = (patIndex_620757019 == ((pattern_620757009) == null ? -1 : (pattern_620757009).length - 1));
- if ((!(onBoundary_620757076) && (strIndex_620757018 < ((str_620757010) == null ? -1 : (str_620757010).length - 1)))) {
- var nextPatternChar_620757077 = nsuToLowerAsciiChar(pattern_620757009.charCodeAt(chckIndx(addInt(patIndex_620757019, 1), 0, (pattern_620757009).length - 1)));
- var nextStrChar_620757078 = nsuToLowerAsciiChar(str_620757010.charCodeAt(chckIndx(addInt(strIndex_620757018, 1), 0, (str_620757010).length - 1)));
- if (!!((ConstSet5[nextStrChar_620757078] != undefined))) Temporary4 = false; else { Temporary4 = !((nextStrChar_620757078 == nextPatternChar_620757077)); } onBoundary_620757076 = Temporary4;
+ var onBoundary_738197588 = (patIndex_738197531 == ((pattern_p0) == null ? -1 : (pattern_p0).length - 1));
+ if ((!(onBoundary_738197588) && (strIndex_738197530 < ((str_p1) == null ? -1 : (str_p1).length - 1)))) {
+ var nextPatternChar_738197589 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(addInt(patIndex_738197531, 1), 0, (pattern_p0).length - 1)));
+ var nextStrChar_738197590 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(addInt(strIndex_738197530, 1), 0, (str_p1).length - 1)));
+ if (!!((ConstSet5[nextStrChar_738197590] != undefined))) Temporary4 = false; else { Temporary4 = !((nextStrChar_738197590 == nextPatternChar_738197589)); } onBoundary_738197588 = Temporary4;
}
- if (onBoundary_620757076) {
- scoreState_620757014 = 20;
- score_620757020 = addInt(score_620757020, scoreState_620757014);
+ if (onBoundary_738197588) {
+ scoreState_738197526 = 20;
+ score_738197532 = addInt(score_738197532, scoreState_738197526);
}
break;
- case -1:
- case -3:
- if (!((ConstSet6[str_620757010.charCodeAt(chckIndx(subInt(strIndex_620757018, 1), 0, (str_620757010).length - 1))] != undefined))) Temporary5 = true; else { if (!(ConstSet7[str_620757010.charCodeAt(chckIndx(subInt(strIndex_620757018, 1), 0, (str_620757010).length - 1))] != undefined)) Temporary6 = false; else { Temporary6 = (ConstSet8[str_620757010.charCodeAt(chckIndx(strIndex_620757018, 0, (str_620757010).length - 1))] != undefined); } Temporary5 = Temporary6; } var isLeadingChar_620757102 = Temporary5;
- if (isLeadingChar_620757102) {
- scoreState_620757014 = 10;
+ case (-1):
+ case (-3):
+ if (!((ConstSet6[str_p1.charCodeAt(chckIndx(subInt(strIndex_738197530, 1), 0, (str_p1).length - 1))] != undefined))) Temporary5 = true; else { if (!(ConstSet7[str_p1.charCodeAt(chckIndx(subInt(strIndex_738197530, 1), 0, (str_p1).length - 1))] != undefined)) Temporary6 = false; else { Temporary6 = (ConstSet8[str_p1.charCodeAt(chckIndx(strIndex_738197530, 0, (str_p1).length - 1))] != undefined); } Temporary5 = Temporary6; } var isLeadingChar_738197614 = Temporary5;
+ if (isLeadingChar_738197614) {
+ scoreState_738197526 = 10;
}
else {
- scoreState_620757014 = 0;
- score_620757020 = addInt(score_620757020, scoreState_620757014);
+ scoreState_738197526 = 0;
+ score_738197532 = addInt(score_738197532, scoreState_738197526);
}
break;
}
- patIndex_620757019 = addInt(patIndex_620757019, 1);
+ patIndex_738197531 = addInt(patIndex_738197531, 1);
}
else {
- switch (scoreState_620757014) {
- case -100:
- scoreState_620757014 = -3;
- score_620757020 = addInt(score_620757020, scoreState_620757014);
+ switch (scoreState_738197526) {
+ case (-100):
+ scoreState_738197526 = (-3);
+ score_738197532 = addInt(score_738197532, scoreState_738197526);
break;
case 5:
- scoreState_620757014 = -1;
- score_620757020 = addInt(score_620757020, scoreState_620757014);
- consecutiveMatchCount_620757017 = 0;
+ scoreState_738197526 = (-1);
+ score_738197532 = addInt(score_738197532, scoreState_738197526);
+ consecutiveMatchCount_738197529 = 0;
break;
- case -3:
- if ((unmatchedLeadingCharCount_620757016 < 3)) {
- scoreState_620757014 = -3;
- score_620757020 = addInt(score_620757020, scoreState_620757014);
+ case (-3):
+ if ((unmatchedLeadingCharCount_738197528 < 3)) {
+ scoreState_738197526 = (-3);
+ score_738197532 = addInt(score_738197532, scoreState_738197526);
}
- unmatchedLeadingCharCount_620757016 = addInt(unmatchedLeadingCharCount_620757016, 1);
+ unmatchedLeadingCharCount_738197528 = addInt(unmatchedLeadingCharCount_738197528, 1);
break;
default:
- scoreState_620757014 = -1;
- score_620757020 = addInt(score_620757020, scoreState_620757014);
+ scoreState_738197526 = (-1);
+ score_738197532 = addInt(score_738197532, scoreState_738197526);
break;
}
}
- strIndex_620757018 = addInt(strIndex_620757018, 1);
- } while (false);
+ strIndex_738197530 = addInt(strIndex_738197530, 1);
+ };
}
- } while (false);
- if (!(patIndex_620757019 == ((pattern_620757009) == null ? 0 : (pattern_620757009).length))) Temporary7 = false; else { if ((strIndex_620757018 == ((str_620757010) == null ? 0 : (str_620757010).length))) Temporary8 = true; else { Temporary8 = !((ConstSet9[str_620757010.charCodeAt(chckIndx(strIndex_620757018, 0, (str_620757010).length - 1))] != undefined)); } Temporary7 = Temporary8; } if (Temporary7) {
- score_620757020 = addInt(score_620757020, 10);
+ };
+ if (!(patIndex_738197531 == ((pattern_p0) == null ? 0 : (pattern_p0).length))) Temporary7 = false; else { if ((strIndex_738197530 == ((str_p1) == null ? 0 : (str_p1).length))) Temporary8 = true; else { Temporary8 = !((ConstSet9[str_p1.charCodeAt(chckIndx(strIndex_738197530, 0, (str_p1).length - 1))] != undefined)); } Temporary7 = Temporary8; } if (Temporary7) {
+ score_738197532 = addInt(score_738197532, 10);
}
- var colontmp__469762919 = nimMax(0, score_620757020);
- var colontmp__469762920 = (0 < score_620757020);
- result_620757013 = nimCopy(result_620757013, {Field0: colontmp__469762919, Field1: colontmp__469762920}, NTI620757006);
+ var colontmp__587203875 = nimMax(0, score_738197532);
+ var colontmp__587203876 = (0 < score_738197532);
+ result_738197525 = nimCopy(result_738197525, {Field0: colontmp__587203875, Field1: colontmp__587203876}, NTI738197518);
- return result_620757013;
+ return result_738197525;
}
-function escapeCString_469762714(x_469762715, x_469762715_Idx) {
- var s_469762716 = [];
- Label1: do {
- var c_469762717 = 0;
- var iHEX60gensym6_469762923 = 0;
- var nHEX60gensym6_469762924 = ((x_469762715[x_469762715_Idx]) == null ? 0 : (x_469762715[x_469762715_Idx]).length);
- Label2: do {
+function escapeCString__dochack_u751(x_p0, x_p0_Idx) {
+ var s_587203313 = [];
+ Label1: {
+ var c_587203314 = 0;
+ var iHEX60gensym13_587203879 = 0;
+ var nHEX60gensym13_587203880 = ((x_p0[x_p0_Idx]) == null ? 0 : (x_p0[x_p0_Idx]).length);
+ Label2: {
Label3: while (true) {
- if (!(iHEX60gensym6_469762923 < nHEX60gensym6_469762924)) break Label3;
- c_469762717 = x_469762715[x_469762715_Idx].charCodeAt(chckIndx(iHEX60gensym6_469762923, 0, (x_469762715[x_469762715_Idx]).length - 1));
- switch (c_469762717) {
+ if (!(iHEX60gensym13_587203879 < nHEX60gensym13_587203880)) break Label3;
+ c_587203314 = x_p0[x_p0_Idx].charCodeAt(chckIndx(iHEX60gensym13_587203879, 0, (x_p0[x_p0_Idx]).length - 1));
+ switch (c_587203314) {
case 60:
- s_469762716.push.apply(s_469762716, makeNimstrLit("<"));;
+ s_587203313.push.apply(s_587203313, [38,108,116,59]);;
break;
case 62:
- s_469762716.push.apply(s_469762716, makeNimstrLit(">"));;
+ s_587203313.push.apply(s_587203313, [38,103,116,59]);;
break;
default:
- addChar(s_469762716, c_469762717);;
+ addChar(s_587203313, c_587203314);;
break;
}
- iHEX60gensym6_469762923 = addInt(iHEX60gensym6_469762923, 1);
+ iHEX60gensym13_587203879 += 1;
}
- } while (false);
- } while (false);
- x_469762715[x_469762715_Idx] = toJSStr(s_469762716);
+ };
+ };
+ x_p0[x_p0_Idx] = toJSStr(s_587203313);
}
-function text_469762106(s_469762107) {
- var result_469762108 = null;
+function dosearch__dochack_u755(value_p0) {
+ var Temporary5;
- result_469762108 = document.createTextNode(toJSStr(s_469762107));
+function HEX3Aanonymous__dochack_u783(a_p0, b_p1) {
+ var result_587203356 = 0;
- return result_469762108;
+ result_587203356 = subInt(b_p1["Field1"], a_p0["Field1"]);
-}
+ return result_587203356;
-function dosearch_469762718(value_469762719) {
-
-function HEX3Aanonymous_469762775(a_469762780, b_469762781) {
- var result_469762786 = 0;
-
- result_469762786 = subInt(b_469762781["Field1"], a_469762780["Field1"]);
+}
- return result_469762786;
+ var result_587203317 = null;
+ BeforeRet: {
+ if (((db_587203309[0]).length == 0)) {
+ break BeforeRet;
}
-
- var result_469762720 = null;
-
- if (((db_469762710[0]).length == 0)) {
- var stuff_469762724 = null;
- var request = new XMLHttpRequest();
- request.open("GET", "theindex.html", false);
- request.send(null);
-
- var doc = document.implementation.createHTMLDocument("theindex");
- doc.documentElement.innerHTML = request.responseText;
-
- //parser=new DOMParser();
- //doc=parser.parseFromString("", "text/html");
-
- stuff_469762724 = doc.documentElement;
- db_469762710[0] = nimCopy(null, stuff_469762724.getElementsByClassName("reference"), NTI603980220);
- contents_469762711[0] = nimCopy(null, [], NTI469762606);
- Label1: do {
- var ahref_469762749 = null;
- var i_469762904 = 0;
- var L_469762905 = (db_469762710[0]).length;
- Label2: do {
+ var ul_587203321 = tree__dochack_u130("UL", []);
+ result_587203317 = tree__dochack_u130("DIV", []);
+ setClass__dochack_u152(result_587203317, "search_results");
+ var matches_587203326 = [];
+ Label1: {
+ var i_587203334 = 0;
+ var colontmp__587203866 = 0;
+ colontmp__587203866 = (db_587203309[0]).length;
+ var i_587203867 = 0;
+ Label2: {
Label3: while (true) {
- if (!(i_469762904 < L_469762905)) break Label3;
- ahref_469762749 = db_469762710[0][chckIndx(i_469762904, 0, (db_469762710[0]).length - 1)];
- contents_469762711[0].push(ahref_469762749.getAttribute("data-doc-search-tag"));;
- i_469762904 = addInt(i_469762904, 1);
- if (!(((db_469762710[0]).length == L_469762905))) {
- failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it"));
- }
-
- }
- } while (false);
- } while (false);
- }
-
- var ul_469762754 = tree_469762055(makeNimstrLit("UL"), []);
- result_469762720 = tree_469762055(makeNimstrLit("DIV"), []);
- setClass_469762103(result_469762720, makeNimstrLit("search_results"));
- var matches_469762759 = [];
- Label4: do {
- var i_469762767 = 0;
- var colontmp__469762909 = 0;
- colontmp__469762909 = (db_469762710[0]).length;
- var i_469762910 = 0;
- Label5: do {
- Label6: while (true) {
- if (!(i_469762910 < colontmp__469762909)) break Label6;
- i_469762767 = i_469762910;
- Label7: do {
- var c_469762768 = contents_469762711[0][chckIndx(i_469762767, 0, (contents_469762711[0]).length - 1)];
- if (((c_469762768 == "Examples") || (c_469762768 == "PEG construction"))) {
- break Label7;
+ if (!(i_587203867 < colontmp__587203866)) break Label3;
+ i_587203334 = i_587203867;
+ Label4: {
+ var c_587203335 = contents_587203310[0][chckIndx(i_587203334, 0, (contents_587203310[0]).length - 1)];
+ if (((c_587203335 == "Examples") || (c_587203335 == "PEG construction"))) {
+ break Label4;
}
- var colontmp__469762916 = fuzzyMatch_620757008(value_469762719, c_469762768);
- var score_469762769 = colontmp__469762916["Field0"];
- var matched_469762770 = colontmp__469762916["Field1"];
- if (matched_469762770) {
- matches_469762759.push({Field0: db_469762710[0][chckIndx(i_469762767, 0, (db_469762710[0]).length - 1)], Field1: score_469762769});;
+ var tmpTuple_587203336 = fuzzyMatch__fuzzysearch_u16(value_p0, c_587203335);
+ var score_587203337 = tmpTuple_587203336["Field0"];
+ var matched_587203338 = tmpTuple_587203336["Field1"];
+ if (matched_587203338) {
+ matches_587203326.push({Field0: db_587203309[0][chckIndx(i_587203334, 0, (db_587203309[0]).length - 1)], Field1: score_587203337});;
}
- } while (false);
- i_469762910 = addInt(i_469762910, 1);
+ };
+ i_587203867 = addInt(i_587203867, 1);
}
- } while (false);
- } while (false);
- matches_469762759.sort(HEX3Aanonymous_469762775);
- Label8: do {
- var i_469762803 = 0;
- var colontmp__469762913 = 0;
- colontmp__469762913 = nimMin((matches_469762759).length, 29);
- var i_469762914 = 0;
- Label9: do {
- Label10: while (true) {
- if (!(i_469762914 < colontmp__469762913)) break Label10;
- i_469762803 = i_469762914;
- matches_469762759[chckIndx(i_469762803, 0, (matches_469762759).length - 1)]["Field0"].innerHTML = matches_469762759[chckIndx(i_469762803, 0, (matches_469762759).length - 1)]["Field0"].getAttribute("data-doc-search-tag");
- escapeCString_469762714(matches_469762759[chckIndx(i_469762803, 0, (matches_469762759).length - 1)]["Field0"], "innerHTML");
- add_469762099(ul_469762754, tree_469762055(makeNimstrLit("LI"), [matches_469762759[chckIndx(i_469762803, 0, (matches_469762759).length - 1)]["Field0"]]));
- i_469762914 = addInt(i_469762914, 1);
+ };
+ };
+ Temporary5 = HEX3Aanonymous__dochack_u783.bind(null); Temporary5.ClP_0 = HEX3Aanonymous__dochack_u783; Temporary5.ClE_0 = null;
+ matches_587203326.sort(Temporary5);
+ Label6: {
+ var i_587203373 = 0;
+ var colontmp__587203870 = 0;
+ colontmp__587203870 = nimMin((matches_587203326).length, 29);
+ var i_587203871 = 0;
+ Label7: {
+ Label8: while (true) {
+ if (!(i_587203871 < colontmp__587203870)) break Label8;
+ i_587203373 = i_587203871;
+ matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"].innerHTML = matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"].getAttribute("data-doc-search-tag");
+ escapeCString__dochack_u751(matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"], "innerHTML");
+ add__dochack_u148(ul_587203321, tree__dochack_u130("LI", [matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"]]));
+ i_587203871 = addInt(i_587203871, 1);
}
- } while (false);
- } while (false);
- if ((ul_469762754.childNodes.length == 0)) {
- add_469762099(result_469762720, tree_469762055(makeNimstrLit("B"), [text_469762106(makeNimstrLit("no search results"))]));
+ };
+ };
+ if ((ul_587203321.childNodes.length == 0)) {
+ add__dochack_u148(result_587203317, tree__dochack_u130("B", [text__dochack_u155("no search results")]));
}
else {
- add_469762099(result_469762720, tree_469762055(makeNimstrLit("B"), [text_469762106(makeNimstrLit("search results"))]));
- add_469762099(result_469762720, ul_469762754);
+ add__dochack_u148(result_587203317, tree__dochack_u130("B", [text__dochack_u155("search results")]));
+ add__dochack_u148(result_587203317, ul_587203321);
}
+ };
- return result_469762720;
+ return result_587203317;
+}
+
+function hideSearch__dochack_u1090() {
+ if (!((oldtoc_587203646[0] == null))) {
+ replaceById__dochack_u158("tocRoot", oldtoc_587203646[0]);
+ }
+
+
+
+}
+
+function runSearch__dochack_u1094() {
+ var elem_587203655 = document.getElementById("searchInput");
+ var value_587203656 = elem_587203655.value;
+ if (!((value_587203656 == ""))) {
+ if ((oldtoc_587203646[0] == null)) {
+ oldtoc_587203646[0] = document.getElementById("tocRoot");
+ }
+
+ var results_587203660 = dosearch__dochack_u755(value_587203656);
+ replaceById__dochack_u158("tocRoot", results_587203660);
+ }
+ else {
+ hideSearch__dochack_u1090();
+ }
+
+
+
}
function search() {
+ var Temporary1;
+
+ if ((loadIndexFut_587203649[0] == null)) {
+ loadIndexFut_587203649[0] = loadIndex__dochack_u928();
+ (then__dochack_u1107(loadIndexFut_587203649[0], runSearch__dochack_u1094, null));
+ }
-function wrapper_469762870() {
- var elem_469762871 = document.getElementById("searchInput");
- var value_469762872 = elem_469762871.value;
- if (!((((value_469762872) == null ? 0 : (value_469762872).length) == 0))) {
- if ((oldtoc_469762858[0] == null)) {
- oldtoc_469762858[0] = document.getElementById("tocRoot");
- }
-
- var results_469762876 = dosearch_469762718(value_469762872);
- replaceById_469762114("tocRoot", results_469762876);
- }
- else {
- if (!((oldtoc_469762858[0] == null))) {
- replaceById_469762114("tocRoot", oldtoc_469762858[0]);
- }
- }
+ if (!((timer_587203647[0] == null))) {
+ clearTimeout(timer_587203647[0]);
+ }
+
+ Temporary1 = runSearch__dochack_u1094.bind(null); Temporary1.ClP_0 = runSearch__dochack_u1094; Temporary1.ClE_0 = null;
+ timer_587203647[0] = setTimeout(Temporary1, 400);
-
+
+}
+
+function copyToClipboard() {
+
+ function updatePreTags() {
+
+ const allPreTags = document.querySelectorAll("pre:not(.line-nums)")
+
+ allPreTags.forEach((e) => {
+
+ const div = document.createElement("div")
+ div.classList.add("copyToClipBoard")
+
+ const preTag = document.createElement("pre")
+ preTag.innerHTML = e.innerHTML
+
+ const button = document.createElement("button")
+ button.value = e.textContent.replace('...', '')
+ button.classList.add("copyToClipBoardBtn")
+ button.style.cursor = "pointer"
+
+ div.appendChild(preTag)
+ div.appendChild(button)
+
+ e.outerHTML = div.outerHTML
+
+ })
}
- if (!((timer_469762859[0] == null))) {
- clearTimeout(timer_469762859[0]);
+
+ function copyTextToClipboard(e) {
+ const clipBoardContent = e.target.value
+ navigator.clipboard.writeText(clipBoardContent).then(function() {
+ e.target.style.setProperty("--clipboard-image", "var(--clipboard-image-selected)")
+ }, function(err) {
+ console.error("Could not copy text: ", err);
+ });
}
+
+ window.addEventListener("click", (e) => {
+ if (e.target.classList.contains("copyToClipBoardBtn")) {
+ copyTextToClipboard(e)
+ }
+ })
+
+ window.addEventListener("mouseover", (e) => {
+ if (e.target.nodeName === "PRE") {
+ e.target.nextElementSibling.style.setProperty("--clipboard-image", "var(--clipboard-image-normal)")
+ }
+ })
+
+ window.addEventListener("DOMContentLoaded", updatePreTags)
+
- timer_469762859[0] = setTimeout(wrapper_469762870, 400);
}
+var Temporary1;
+var Temporary2;
+
+function HEX3Aanonymous__dochack_u1175(e_p0) {
+ if ((e_p0.key == "/")) {
+ e_p0.preventDefault();
+ var searchElem_587203737 = document.getElementById("searchInput");
+ searchElem_587203737.focus();
+ searchElem_587203737.parentElement.scrollIntoView();
+ runSearch__dochack_u1094();
+ }
+
+
+
+}
+var Temporary3;
+
+function HEX3Aanonymous__dochack_u1210(e_p0) {
+ hideSearch__dochack_u1090();
+
+
+}
+var Temporary4;
+var t_587202599 = window.localStorage.getItem("theme");
+if ((t_587202599 == null)) {
+Temporary1 = "auto";
+}
+else {
+Temporary1 = t_587202599;
+}
+
+setTheme(Temporary1);
+var alternative_587203267 = [null];
+var db_587203309 = [[]];
+var contents_587203310 = [[]];
+var oldtoc_587203646 = [null];
+var timer_587203647 = [null];
+var loadIndexFut_587203649 = [null];
+Temporary2 = HEX3Aanonymous__dochack_u1175.bind(null); Temporary2.ClP_0 = HEX3Aanonymous__dochack_u1175; Temporary2.ClE_0 = null;
+window.addEventListener("keypress", Temporary2, false);
+Temporary3 = HEX3Aanonymous__dochack_u1210.bind(null); Temporary3.ClP_0 = HEX3Aanonymous__dochack_u1210; Temporary3.ClE_0 = null;
+window.addEventListener("hashchange", Temporary3, false);
+copyToClipboard();
+Temporary4 = onDOMLoaded.bind(null); Temporary4.ClP_0 = onDOMLoaded; Temporary4.ClE_0 = null;
+window.addEventListener("DOMContentLoaded", Temporary4, false);
diff --git a/docs/nimdoc.out.css b/docs/nimdoc.out.css
index 4abea9c..3fc453d 100644
--- a/docs/nimdoc.out.css
+++ b/docs/nimdoc.out.css
@@ -11,6 +11,7 @@ Modified by Boyd Greenfield and narimiran
*/
:root {
+ color-scheme: light;
--primary-background: #fff;
--secondary-background: ghostwhite;
--third-background: #e8e8e8;
@@ -38,9 +39,14 @@ Modified by Boyd Greenfield and narimiran
--program: #6060c0;
--option: #508000;
--raw-data: #a4255b;
+
+ --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: black' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E");
+ --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: black' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E");
+ --clipboard-image: var(--clipboard-image-normal)
}
[data-theme="dark"] {
+ color-scheme: dark;
--primary-background: #171921;
--secondary-background: #1e202a;
--third-background: #2b2e3b;
@@ -68,73 +74,65 @@ Modified by Boyd Greenfield and narimiran
--program: #9090c0;
--option: #90b010;
--raw-data: #8be9fd;
+
+ --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E");
+ --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E");
+ --clipboard-image: var(--clipboard-image-normal);
+}
+
+@media (prefers-color-scheme: dark) {
+ [data-theme="auto"] {
+ color-scheme: dark;
+ --primary-background: #171921;
+ --secondary-background: #1e202a;
+ --third-background: #2b2e3b;
+ --info-background: #008000;
+ --warning-background: #807000;
+ --error-background: #c03000;
+ --border: #0e1014;
+ --text: #fff;
+ --anchor: #8be9fd;
+ --anchor-focus: #8be9fd;
+ --input-focus: #8be9fd;
+ --strong: #bd93f9;
+ --hint: #7A7C85;
+ --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAABMCAYAAABOBlMuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnh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au7aPIyCWAxWABjUbPif9HCMbjURtKiaQBfvr5zH9evlJ0uLQ4r/nJMXNiZTIRrMAlJAcHB18HBweWo6Mjy8rKajeJRAJLS0uwtLQECwsLoFAogMfjAYvFgpmZ2XNXMyqVCoaHh2FoaAiGh4cfvwYGBqCvrw+6u7vfvnfvXlNvb29rT09Pq0QsUM7S6c4rNqS/lrZ5U+YPRBKR9M7u9xwqBUUvtNAudH766XSLE8PR49ixE78/8tVnX403Zk7fUR46NUUAIPIPCMdTKJTdNjY2QKPRgE6nA51OB1tbWyCRSIDD4YBAIAAejwcCgfDYUajVakGlUoFarQadTvfY79HX1wf9/f0gl8tBLpfDvXv3HvXw+dxQPYYXMj+d+P7Mmzv+5OHr6/OJWq1GBHeB09TcUiKuq/coKS3/eqIx/wPkiIXC3w6YjAAAAABJRU5ErkJggg==");
+
+ --keyword: #ff79c6;
+ --identifier: #f8f8f2;
+ --comment: #6272a4;
+ --operator: #ff79c6;
+ --punctuation: #f8f8f2;
+ --other: #f8f8f2;
+ --escapeSequence: #bd93f9;
+ --number: #bd93f9;
+ --literal: #f1fa8c;
+ --program: #9090c0;
+ --option: #90b010;
+ --raw-data: #8be9fd;
+
+ --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E");
+ --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E");
+ --clipboard-image: var(--clipboard-image-normal);
+ }
}
-.theme-switch-wrapper {
+.theme-select-wrapper {
display: flex;
align-items: center;
}
-.theme-switch-wrapper em {
- margin-left: 10px;
- font-size: 1rem;
-}
-
-.theme-switch {
- display: inline-block;
- height: 22px;
- position: relative;
- width: 50px;
-}
-
-.theme-switch input {
- display: none;
-}
-
-.slider {
- background-color: #ccc;
- bottom: 0;
- cursor: pointer;
- left: 0;
- position: absolute;
- right: 0;
- top: 0;
- transition: .4s;
-}
-
-.slider:before {
- background-color: #fff;
- bottom: 4px;
- content: "";
- height: 13px;
- left: 4px;
- position: absolute;
- transition: .4s;
- width: 13px;
-}
-
-input:checked + .slider {
- background-color: #66bb6a;
-}
-
-input:checked + .slider:before {
- transform: translateX(26px);
-}
-
-.slider.round {
- border-radius: 17px;
-}
-
-.slider.round:before {
- border-radius: 50%;
-}
-
html {
+ overflow-x: hidden;
+ max-width: 100%;
+ box-sizing: border-box;
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%; }
body {
+ max-width: 100%;
+ box-sizing: border-box;
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
font-weight: 400;
font-size: 1.125em;
@@ -151,24 +149,39 @@ body {
padding: 0;
box-sizing: border-box; }
-.column,
-.columns {
+.column, .columns {
width: 100%;
float: left;
box-sizing: border-box;
- margin-left: 1%;
+ margin-left: 1%; }
+
+@media print {
+ #global-links, .link-seesrc, .theme-switch-wrapper, #searchInputDiv, .search-groupby {
+ display:none;
+ }
+ .columns {
+ width:100% !important;
+ }
}
-.column:first-child,
-.columns:first-child {
+.column:first-child, .columns:first-child {
margin-left: 0; }
+.container .row {
+ display: flex; }
+
.three.columns {
- width: 22%;
+ width: 25.0%;
+ height: 100vh;
+ position: sticky;
+ top: 0px;
+ overflow-y: auto;
+ padding: 2px;
}
.nine.columns {
- width: 77.0%; }
+ width: 75.0%;
+ padding-left: 1.5em; }
.twelve.columns {
width: 100%;
@@ -255,27 +268,32 @@ a.reference-toplevel {
font-weight: bold;
}
+a.nimdoc {
+ word-spacing: 0.3em;
+}
+
a.toc-backref {
text-decoration: none;
- color: var(--text); }
+ color: var(--text);
+}
a.link-seesrc {
color: #607c9f;
font-size: 0.9em;
- font-style: italic; }
+ font-style: italic;
+}
-a:hover,
-a:focus {
+a:hover, a:focus {
color: var(--anchor-focus);
- text-decoration: underline; }
+ text-decoration: underline;
+}
a:hover span.Identifier {
color: var(--anchor);
}
-sub,
-sup {
+sub, sup {
position: relative;
font-size: 75%;
line-height: 0;
@@ -302,8 +320,7 @@ img {
background: transparent !important;
box-shadow: none !important; }
- a,
- a:visited {
+ a, a:visited {
text-decoration: underline; }
a[href]:after {
@@ -317,16 +334,14 @@ img {
a[href^="#"]:after {
content: ""; }
- pre,
- blockquote {
+ pre, blockquote {
border: 1px solid #999;
page-break-inside: avoid; }
thead {
display: table-header-group; }
- tr,
- img {
+ tr, img {
page-break-inside: avoid; }
img {
@@ -341,22 +356,18 @@ img {
h1.title {
page-break-before: avoid; }
- p,
- h2,
- h3 {
+ p, h2, h3 {
orphans: 3;
widows: 3; }
- h2,
- h3 {
+ h2, h3 {
page-break-after: avoid; }
}
p {
margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
+ margin-bottom: 0.5em; }
small {
font-size: 85%; }
@@ -364,8 +375,7 @@ small {
strong {
font-weight: 600;
font-size: 0.95em;
- color: var(--strong);
-}
+ color: var(--strong); }
em {
font-style: italic; }
@@ -386,8 +396,7 @@ h1.title {
text-align: center;
font-weight: 900;
margin-top: 0.75em;
- margin-bottom: 0em;
-}
+ margin-bottom: 0em; }
h2 {
font-size: 1.3em;
@@ -414,36 +423,29 @@ h6 {
font-size: 1.1em; }
-ul,
-ol {
+ul, ol {
padding: 0;
margin-top: 0.5em;
margin-left: 0.75em; }
-ul ul,
-ul ol,
-ol ol,
-ol ul {
+ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
margin-left: 1.25em; }
ul.simple > li {
- list-style-type: circle;
-}
+ list-style-type: circle; }
ul.simple-boot li {
- list-style-type: none;
- margin-left: 0em;
- margin-bottom: 0.5em;
-}
+ list-style-type: none;
+ margin-left: 0em;
+ margin-bottom: 0.5em; }
ol.simple > li, ul.simple > li {
margin-bottom: 0.2em;
margin-left: 0.4em }
ul.simple.simple-toc > li {
- margin-top: 1em;
-}
+ margin-top: 1em; }
ul.simple-toc {
list-style: none;
@@ -452,8 +454,7 @@ ul.simple-toc {
margin-top: 1em; }
ul.simple-toc > li {
- list-style-type: none;
-}
+ list-style-type: none; }
ul.simple-toc-section {
list-style-type: circle;
@@ -463,12 +464,10 @@ ul.simple-toc-section {
ul.nested-toc-section {
list-style-type: circle;
margin-left: -0.75em;
- color: var(--text);
-}
+ color: var(--text); }
ul.nested-toc-section > li {
- margin-left: 1.25em;
-}
+ margin-left: 1.25em; }
ol.arabic {
@@ -515,7 +514,8 @@ hr.footnote {
margin-top: 0.15em;
}
div.footnote-group {
- margin-left: 1em; }
+ margin-left: 1em;
+}
div.footnote-label {
display: inline-block;
min-width: 1.7em;
@@ -555,6 +555,11 @@ blockquote {
border-left: 5px solid #bbc;
}
+blockquote.markdown-quote {
+ font-size: 0.9rem; /* use rem to avoid recursion */
+ font-style: normal;
+}
+
.pre, span.tok {
font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
font-weight: 500;
@@ -564,6 +569,8 @@ blockquote {
padding-left: 3px;
padding-right: 3px;
border-radius: 4px;
+ white-space: normal;
+ word-break: break-all;
}
span.tok {
@@ -572,6 +579,10 @@ span.tok {
margin-right: 0.2em;
}
+.copyToClipBoard {
+ position: relative;
+}
+
pre {
font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
color: var(--text);
@@ -579,18 +590,37 @@ pre {
display: inline-block;
box-sizing: border-box;
min-width: 100%;
+ max-width: 100%;
padding: 0.5em;
margin-top: 0.5em;
margin-bottom: 0.5em;
font-size: 0.85em;
white-space: pre !important;
overflow-y: hidden;
- overflow-x: visible;
+ overflow-x: auto;
background-color: var(--secondary-background);
border: 1px solid var(--border);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
- border-radius: 6px; }
+ border-radius: 6px;
+}
+
+.copyToClipBoardBtn {
+ visibility: hidden;
+ position: absolute;
+ width: 24px;
+ border-radius: 4px;
+ background-image: var(--clipboard-image);
+ right: 5px;
+ top: 13px;
+ background-color: var(--secondary-background);
+ padding: 11px;
+ border: 0;
+}
+
+.copyToClipBoard:hover .copyToClipBoardBtn {
+ visibility: visible;
+}
.pre-scrollable {
max-height: 340px;
@@ -604,8 +634,8 @@ pre {
table.line-nums-table {
border-radius: 4px;
- border: 1px solid #cccccc;
- background-color: ghostwhite;
+ border: 1px solid var(--border);
+ background-color: var(--secondary-background);
border-collapse: separate;
margin-top: 15px;
margin-bottom: 25px; }
@@ -641,6 +671,9 @@ table {
border-collapse: collapse;
border-color: var(--third-background);
border-spacing: 0;
+}
+
+table:not(.line-nums-table) {
font-size: 0.9em;
}
@@ -655,11 +688,11 @@ table th {
font-weight: bold; }
table th.docinfo-name {
- background-color: transparent;
- text-align: right;
+ background-color: transparent;
+ text-align: right;
}
-table tr:hover {
+table:not(.line-nums-table) tr:hover {
background-color: var(--third-background); }
@@ -673,31 +706,31 @@ table.borderless td, table.borderless th {
padding: 0 0.5em 0 0 !important; }
.admonition {
- padding: 0.3em;
- background-color: var(--secondary-background);
- border-left: 0.4em solid #7f7f84;
- margin-bottom: 0.5em;
- -webkit-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
- -moz-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
- box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
+ padding: 0.3em;
+ background-color: var(--secondary-background);
+ border-left: 0.4em solid #7f7f84;
+ margin-bottom: 0.5em;
+ -webkit-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
+ -moz-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
+ box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
}
.admonition-info {
- border-color: var(--info-background);
+ border-color: var(--info-background);
}
.admonition-info-text {
- color: var(--info-background);
+ color: var(--info-background);
}
.admonition-warning {
- border-color: var(--warning-background);
+ border-color: var(--warning-background);
}
.admonition-warning-text {
- color: var(--warning-background);
+ color: var(--warning-background);
}
.admonition-error {
- border-color: var(--error-background);
+ border-color: var(--error-background);
}
.admonition-error-text {
- color: var(--error-background);
+ color: var(--error-background);
}
.first {
@@ -731,8 +764,7 @@ div.footer, div.header {
font-size: smaller; }
div.footer {
- padding-top: 5em;
-}
+ padding-top: 5em; }
div.line-block {
display: block;
@@ -749,19 +781,22 @@ div.topic {
div.search_results {
background-color: var(--third-background);
- margin: 3em;
padding: 1em;
border: 1px solid #4d4d4d;
-}
+ position: sticky;
+ top: 1em;
+ isolation: isolate;
+ max-width: calc(100vw - 6em);
+ z-index: 1;
+ max-height: calc(100vh - 6em);
+ overflow-y: scroll;}
div#global-links ul {
margin-left: 0;
- list-style-type: none;
-}
+ list-style-type: none; }
div#global-links > simple-boot {
- margin-left: 3em;
-}
+ margin-left: 3em; }
hr.docutils {
width: 75%; }
@@ -941,8 +976,7 @@ span.Directive {
span.option {
font-weight: bold;
font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
- color: var(--option);
-}
+ color: var(--option); }
span.Prompt {
font-weight: bold;
@@ -958,11 +992,10 @@ span.program {
text-decoration: underline;
text-decoration-color: var(--hint);
text-decoration-thickness: 0.05em;
- text-underline-offset: 0.15em;
-}
+ text-underline-offset: 0.15em; }
-span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference,
-span.Other {
+span.Command, span.Rule, span.Hyperlink,
+span.Label, span.Reference, span.Other {
color: var(--other); }
/* Pop type, const, proc, and iterator defs in nim def blocks */
@@ -1000,17 +1033,14 @@ span.pragmadots {
border-radius: 4px;
margin: 0 2px;
cursor: pointer;
- font-size: 0.8em;
-}
+ font-size: 0.8em; }
span.pragmadots:hover {
- background-color: var(--hint);
-}
+ background-color: var(--hint); }
+
span.pragmawrap {
- display: none;
-}
+ display: none; }
span.attachedType {
display: none;
- visibility: hidden;
-}
+ visibility: hidden; }
diff --git a/docs/theindex.html b/docs/theindex.html
index 4d941d6..2e6c6a6 100644
--- a/docs/theindex.html
+++ b/docs/theindex.html
@@ -1,436 +1,487 @@
-
+
-
+
-
-
-
-
-
+
Index
-
-
Index
-
-
-
-
-
+
+
+
+
-
-
-
Index
- Modules:
argparse ,
argparse/backend ,
argparse/filler ,
argparse/macrohelp .
API symbols
+
-
+
diff --git a/src/argparse.nim b/src/argparse.nim
index 4e00ef9..45f87ad 100644
--- a/src/argparse.nim
+++ b/src/argparse.nim
@@ -15,7 +15,7 @@
## ``run:`` code to run when the parser is used in run mode
## ``nohelpflag()`` disable the automatic ``-h/--help`` flag
## =================== ===================================================
-##
+##
## The following special variables are available within ``run`` blocks:
##
## - ``opts`` - contains your user-defined options. Same thing as returned from ``parse(...)`` scoped to the subcommand.
@@ -26,19 +26,19 @@
## - ``opts.NAMEOFCOMMAND`` - Same as above, but a shorter version (if there's no name conflict with other flags/options/args)
##
## If ``Parser.parse()`` and ``Parser.run()`` are called without arguments, they use the arguments from the command line.
-##
+##
## By default (unless ``nohelpflag`` is present) calling ``parse()`` with a help
## flag (``-h`` / ``--help``) will raise a ``ShortCircuit`` error. The error's ``flag``
## field will contain the name of the flag that triggered the short circuit.
## For help-related short circuits, the error's ``help`` field will contain the help text
## of the given subcommand.
-##
+##
runnableExamples:
- var res:string
+ var res: string
var p = newParser:
help("A demonstration of this library in a program named {prog}")
flag("-n", "--dryrun")
- option("--name", default=some("bob"), help = "Name to use")
+ option("--name", default = some("bob"), help = "Name to use")
command("ls"):
run:
res = "did ls " & opts.parentOpts.name
@@ -61,10 +61,15 @@ runnableExamples:
var p = newParser:
help("A description of this program, named {prog}")
flag("-n", "--dryrun")
- option("-o", "--output", help="Write output to this file", default=some("somewhere.txt"))
+ option(
+ "-o",
+ "--output",
+ help = "Write output to this file",
+ default = some("somewhere.txt"),
+ )
option("-k", "--kind", choices = @["fruit", "vegetable"])
arg("input")
-
+
try:
let opts = p.parse(@["-n", "--output", "another.txt", "cranberry"])
assert opts.dryrun == true
@@ -84,35 +89,58 @@ runnableExamples:
flag("-a")
command "leave":
flag("-b")
-
+
let opts = p.parse(@["go", "-a"])
assert opts.command == "go"
assert opts.go.isSome
assert opts.go.get.a == true
assert opts.leave.isNone
-import std/macros
-import strutils
-import argparse/backend; export backend
-import argparse/macrohelp; export macrohelp
+import std/[macros, strutils, sequtils]
+import argparse/[types, backend, macrohelp]
-proc longAndShort(name1: string, name2: string): tuple[long: string, short: string] =
- ## Given two strings, return the longer and shorter of the two with
- ## shortname possibly being empty.
- var
- longname: string
- shortname: string
- if name2 == "":
- longname = name1
- else:
- if name1.len > name2.len:
- longname = name1
- shortname = name2
+# import export as macros bind in the callers context
+export types,backend,macrohelp
+
+import argparse/shellcompletion/[shellcompletion]
+
+export deriveShellFromEnvVar, COMPLETION_OPT_VARNAME
+type FlagNames = tuple[long: string, short: string]
+proc longAndShortFlag(name1: string, name2: string): FlagNames =
+ ## Extract --long and -short flag names from the two provided names
+ ## Both short, or long, is not allowed
+ ## Short may be empty, long may be empty, but not both
+ ## Flags matching "^--(-)+", "^--?$", are not allowed
+ var n1, n2, longname, shortname: string
+ n1 = strip(name1)
+ n2 = strip(name2)
+ doUsageAssert(n1 & n2 != "", "At least one flag must be provided")
+ for n in [n1, n2]:
+ if n == "":
+ continue
+ doUsageAssert(n.startsWith("-"), "Flag not valid, must start with -")
+ if n.startsWith("--"):
+ doUsageAssert(n.len > 2, "Long flag missing name: '%s'" % n)
+ doUsageAssert(n[2] != '-', "Long flag has excess dashes: '%s'" % n)
+ doUsageAssert(
+ longname == "", "Multiple long flags provided: '%s' and '%s'" % [longname, n]
+ )
+ longname = n
else:
- longname = name2
- shortname = name1
+ doUsageAssert(n.len > 1, "Short flag missing name: '%s'" % n)
+ doUsageAssert(
+ shortname == "", "Multiple short flags provided: '%s' and '%s'" % [shortname, n]
+ )
+ shortname = n
return (longname, shortname)
+proc extractVarname(f: FlagNames): string {.inline.} =
+ ## Return long else short
+ if f.long != "":
+ return f.long.toVarname()
+ else:
+ return f.short.toVarname()
+
template newParser*(name: string, body: untyped): untyped =
## Create a new parser with a static program name.
##
@@ -121,10 +149,15 @@ template newParser*(name: string, body: untyped): untyped =
help("'{prog}' == 'my parser'")
flag("-a")
assert p.parse(@["-a"]).a == true
-
- macro domkParser() : untyped {.gensym.} =
- let builder = addParser(name, "", proc() = body)
+ macro domkParser(): untyped {.gensym.} =
+ let builder = addParser(
+ name,
+ "",
+ proc() =
+ body,
+ )
builder.generateDefs()
+
domkParser()
template newParser*(body: untyped): untyped =
@@ -136,11 +169,24 @@ template newParser*(body: untyped): untyped =
assert p.parse(@["-a"]).a == true
macro domkParser(): untyped =
- let builder = addParser("", "", proc() = body)
- builder.generateDefs()
+ let builder = addParser(
+ "",
+ "",
+ proc() =
+ body,
+ )
+ builder.generateDefs() # During execution of generated code
+
domkParser()
-proc flag*(name1: string, name2 = "", multiple = false, help = "", hidden = false, shortcircuit = false) {.compileTime.} =
+proc flag*(
+ name1: string,
+ name2 = "",
+ multiple = false,
+ help = "",
+ hidden = false,
+ shortcircuit = false,
+) {.compileTime.} =
## Add a boolean flag to the argument parser. The boolean
## will be available on the parsed options object as the
## longest named flag.
@@ -149,7 +195,7 @@ proc flag*(name1: string, name2 = "", multiple = false, help = "", hidden = fals
## times and the datatype will be an int.
##
## If ``hidden`` is true then the flag usage is not shown in the help.
- ##
+ ##
## If ``shortcircuit`` is true, then when the flag is encountered during
## processing, the parser will immediately raise a ``ShortCircuit`` error
## with the ``flag`` attribute set to this flag's name. This is how the
@@ -158,17 +204,17 @@ proc flag*(name1: string, name2 = "", multiple = false, help = "", hidden = fals
## ``help`` is additional help text for this flag.
runnableExamples:
var p = newParser("Some Thing"):
- flag("--show-name", help="Show the name")
- flag("-a", help="Some flag named a")
- flag("-n", "--dryrun", help="Don't actually run")
-
+ flag("--show-name", help = "Show the name")
+ flag("-a", help = "Some flag named a")
+ flag("-n", "--dryrun", help = "Don't actually run")
+
let opts = p.parse(@["--show-name", "-n"])
assert opts.show_name == true
assert opts.a == false
assert opts.dryrun == true
- let names = longAndShort(name1, name2)
- let varname = names.long.toVarname()
+ let names = longAndShortFlag(name1, name2)
+ let varname = names.extractVarname()
builderStack[^1].components.add Component(
kind: ArgFlag,
help: help,
@@ -180,11 +226,21 @@ proc flag*(name1: string, name2 = "", multiple = false, help = "", hidden = fals
hidden: hidden,
)
-proc option*(name1: string, name2 = "", help = "", default = none[string](), env = "", multiple = false, choices: seq[string] = @[], required = false, hidden = false) {.compileTime.} =
- ## Add an option to the argument parser. The longest
- ## named flag will be used as the name on the parsed
- ## result.
- ##
+proc option*(
+ name1: string,
+ name2 = "",
+ help = "",
+ default = none[string](),
+ env = "",
+ multiple = false,
+ choices: seq[string] = @[],
+ completionsGenerator = default(array[ShellCompletionKind, string]),
+ required = false,
+ hidden = false,
+) {.compileTime.} =
+ ## Add an option to the argument parser. The (--) long flag, and if not
+ ## present the (-) short flag will be used as the name on the parsed result.
+ ##
## Additionally, an ``Option[string]`` named ``FLAGNAME_opt``
## will be available on the parse result.
##
@@ -196,9 +252,15 @@ proc option*(name1: string, name2 = "", help = "", default = none[string](), env
## ``opts.FLAGNAME_opt.get(otherwise = RunTimeString)`` instead.
##
## Set ``env`` to an environment variable name to use as the default value
- ##
+ ##
## Set ``choices`` to restrict the possible choices.
- ##
+ ##
+ ## Set ``completionGenerator``, with string at index given by shell kind.
+ ## The string is executable in the target shell and will return a list of
+ ## completions for the option. It is not necessary to provide for every shell
+ ## kind, however completion generator output will only be available where a
+ ## generator string is provided.
+ ##
## Set ``required = true`` if this is a required option. Yes, calling
## it a "required option" is a paradox :)
##
@@ -207,13 +269,33 @@ proc option*(name1: string, name2 = "", help = "", default = none[string](), env
## ``help`` is additional help text for this option.
runnableExamples:
var p = newParser:
- option("-a", "--apple", help="Name of apple")
+ option("-a", "--apple", help = "Name of apple")
assert p.parse(@["-a", "5"]).apple == "5"
assert p.parse(@[]).apple_opt.isNone
assert p.parse(@["--apple", "6"]).apple_opt.get() == "6"
-
- let names = longAndShort(name1, name2)
- let varname = names.long.toVarname()
+ runnableExamples:
+ var p = newParser:
+ option(
+ "-f",
+ "--file",
+ default = some("default.txt"),
+ help = "Output file",
+ completionsGenerator = [
+ ShellCompletionKind.sckFish: "__fish_complete_path",
+ ],
+ )
+ option(
+ "-p",
+ "--pid",
+ env = "MYAPP_PID",
+ help = "Process ID",
+ completionsGenerator = [
+ ShellCompletionKind.sckFish: "__fish_complete_pids",
+ ],
+ )
+
+ let names = longAndShortFlag(name1, name2)
+ let varname = names.extractVarname
builderStack[^1].components.add Component(
kind: ArgOption,
help: help,
@@ -226,28 +308,41 @@ proc option*(name1: string, name2 = "", help = "", default = none[string](), env
optDefault: default,
optChoices: choices,
optRequired: required,
+ optCompletionsGenerator: completionsGenerator,
)
-proc arg*(varname: string, default = none[string](), env = "", help = "", nargs = 1) {.compileTime.} =
+proc arg*(
+ varname: string,
+ default = none[string](),
+ env = "",
+ help = "",
+ completionsGenerator = default(array[ShellCompletionKind, string]),
+ nargs = 1,
+) {.compileTime.} =
## Add an argument to the argument parser.
##
## Set ``default`` to the default ``Option[string]`` value. This is only
## allowed for ``nargs = 1``.
##
## Set ``env`` to an environment variable name to use as the default value. This is only allowed for ``nargs = 1``.
- ##
+ ##
+ ## Set ``completionsGenerator``, with string at index given by shell kind.
+ ## The string is executable in the target shell and will return a list of
+ ## completions for the option.
+ ##
## The value ``nargs`` has the following meanings:
- ##
+ ##
## - ``nargs = 1`` : A single argument. The value type will be ``string``
## - ``nargs = 2`` (or more) : Accept a specific number of arguments. The value type will be ``seq[string]``
## - ``nargs = -1`` : Accept 0 or more arguments. Only one ``nargs = -1`` ``arg()`` is allowed per parser/command.
##
## ``help`` is additional help text for this argument.
runnableExamples:
+ const generator = [ShellCompletionKind.sckFish: "__fish_complete_path"]
var p = newParser:
arg("name", help = "Name of apple")
arg("twowords", nargs = 2)
- arg("more", nargs = -1)
+ arg("more", completionsGenerator= generator, nargs = -1)
let res = p.parse(@["cameo", "hot", "dog", "things"])
assert res.name == "cameo"
assert res.twowords == @["hot", "dog"]
@@ -260,11 +355,12 @@ proc arg*(varname: string, default = none[string](), env = "", help = "", nargs
nargs: nargs,
env: env,
argDefault: default,
+ argCompletionsGenerator: completionsGenerator,
)
proc help*(helptext: string) {.compileTime.} =
## Add help to a parser or subcommand.
- ##
+ ##
## You may use the special string ``{prog}`` within any help text, and it
## will be replaced by the program name.
##
@@ -274,7 +370,7 @@ proc help*(helptext: string) {.compileTime.} =
command("dostuff"):
help("More helpful information")
echo p.help
-
+
builderStack[^1].help &= helptext
proc nohelpflag*() {.compileTime.} =
@@ -297,15 +393,18 @@ template run*(body: untyped): untyped =
template command*(name: string, group: string, content: untyped): untyped =
## Add a subcommand to this parser
- ##
+ ##
## ``group`` is a string used to group commands in help output
runnableExamples:
var p = newParser:
- command("dostuff", "groupA"): discard
- command("morestuff", "groupB"): discard
- command("morelikethefirst", "groupA"): discard
+ command("dostuff", "groupA"):
+ discard
+ command("morestuff", "groupB"):
+ discard
+ command("morelikethefirst", "groupA"):
+ discard
echo p.help
- add_command(name, group) do ():
+ add_command(name, group) do():
content
template command*(name: string, content: untyped): untyped =
@@ -317,4 +416,40 @@ template command*(name: string, content: untyped): untyped =
echo "Actually do stuff"
p.run(@["dostuff"])
command(name, "", content)
-
+
+proc noCompletions*(disableFlag=true,disableOpt=true) {.compileTime.} =
+ ## Disable completions flags
+ runnableExamples:
+ var p = newParser:
+ noCompletions()
+ assert builderStack.len > 0
+ let inSubcommand = builderStack.len > 1
+ doUsageAssert not inSubcommand,
+ "noCompletionsFlag() can only be used at the top-level parser"
+ for ix in countdown(builderStack[^1].components.len - 1, 0):
+ let comp = builderStack[^1].components[ix]
+ # del() will not preserve order
+ if disableOpt:
+ if comp.varname == COMPLETION_OPT_VARNAME:
+ builderStack[^1].components.delete(ix)
+ if disableFlag:
+ if comp.varname == COMPLETION_FLAG_VARNAME:
+ builderStack[^1].components.delete(ix) # del() will not preserve order
+
+proc hideCompletions*(hideFlag=true,hideOpt=true) {.compileTime.} =
+ ## Hide completions flags from help
+ runnableExamples:
+ var p = newParser:
+ hideCompletions()
+ assert builderStack.len > 0
+ let inSubcommand = builderStack.len > 1
+ doUsageAssert not inSubcommand,
+ "hideCompletions() can only be used at the top-level parser"
+ for ix in countdown(builderStack[^1].components.len - 1,0):
+ case builderStack[^1].components[ix].varname
+ of COMPLETION_OPT_VARNAME:
+ if hideOpt: builderStack[^1].components[ix].hidden=true
+ of COMPLETION_FLAG_VARNAME:
+ if hideFlag: builderStack[^1].components[ix].hidden=true
+ else:
+ discard
\ No newline at end of file
diff --git a/src/argparse/backend.nim b/src/argparse/backend.nim
index c83d3cf..82ee526 100644
--- a/src/argparse/backend.nim
+++ b/src/argparse/backend.nim
@@ -1,83 +1,39 @@
-import algorithm; export algorithm
+import algorithm
+export algorithm
import macros
-import options; export options
-import sequtils; export sequtils
-import streams; export streams
+import options
+export options
+import sequtils
+export sequtils
+import streams
+export streams
import strformat
-import strutils; export strutils
+import strutils
+export strutils
import tables
-import os; export os
-
-import ./macrohelp
-import ./filler
-
-type
- UsageError* = object of ValueError
- ShortCircuit* = object of CatchableError
- flag*: string
- help*: string
-
- ComponentKind* = enum
- ArgFlag
- ArgOption
- ArgArgument
-
- Component* = object
- varname*: string
- hidden*: bool
- help*: string
- env*: string
- case kind*: ComponentKind
- of ArgFlag:
- flagShort*: string
- flagLong*: string
- flagMultiple*: bool
- shortCircuit*: bool
- of ArgOption:
- optShort*: string
- optLong*: string
- optMultiple*: bool
- optDefault*: Option[string]
- optChoices*: seq[string]
- optRequired*: bool
- of ArgArgument:
- nargs*: int
- argDefault*: Option[string]
-
- Builder* = ref BuilderObj
- BuilderObj* {.acyclic.} = object
- ## A compile-time object used to accumulate parser options
- ## before building the parser
- name*: string
- ## Command name for subcommand parsers, or program name for
- ## the parent parser.
- symbol*: string
- ## Unique tag to apply to Parser and Option types to avoid
- ## conflicts. By default, this is generated with Nim's
- ## gensym algorithm.
- components*: seq[Component]
- help*: string
- groupName*: string
- children*: seq[Builder]
- parent*: Option[Builder]
- runProcBodies*: seq[NimNode]
-
- ParseState* = object
- tokens*: seq[string]
- cursor*: int
- extra*: seq[string]
- ## tokens that weren't parsed
- done*: bool
- token*: Option[string]
- ## The current unprocessed token
- key*: Option[string]
- ## The current key (possibly the head of a 'key=value' token)
- value*: Option[string]
- ## The current value (possibly the tail of a 'key=value' token)
- valuePartOfToken*: bool
- ## true if the value is part of the current token (e.g. 'key=value')
- runProcs*: seq[proc()]
- ## Procs to be run at the end of parsing
+import os
+export os
+import sets
+
+import argparse/[util,types,filler,macrohelp]
+import argparse/shellcompletion/shellcompletion
+
+type ParseState* = object
+ tokens*: seq[string]
+ cursor*: int
+ extra*: seq[string] ## tokens that weren't parsed
+ done*: bool
+ token*: Option[string] ## The current unprocessed token
+ key*: Option[string] ## The current key (possibly the head of a 'key=value' token)
+ value*: Option[string] ## The current value (possibly the tail of a 'key=value' token)
+ valuePartOfToken*: bool
+ ## true if the value is part of the current token (e.g. 'key=value')
+ runProcs*: seq[proc()] ## Procs to be run at the end of parsing
+
+template doUsageAssert*(condition: bool, msg: string): untyped =
+ ## Raise a UsageError if condition is false
+ if not (`condition`):
+ raise UsageError.newException(`msg`)
var ARGPARSE_STDOUT* = newFileStream(stdout)
var builderStack* {.compileTime.} = newSeq[Builder]()
@@ -85,19 +41,20 @@ var builderStack* {.compileTime.} = newSeq[Builder]()
proc toVarname*(x: string): string =
## Convert x to something suitable as a Nim identifier
## Replaces - with _ for instance
- x.replace("-", "_").strip(chars={'_'})
+ x.replace("-", "_").strip(chars = {'_'})
#--------------------------------------------------------------
# ParseState
#--------------------------------------------------------------
-proc `$`*(state: ref ParseState): string {.inline.} = $(state[])
+proc `$`*(state: ref ParseState): string {.inline.} =
+ $(state[])
proc advance(state: ref ParseState, amount: int, skip = false) =
## Advance the parse by `amount` tokens
- ##
+ ##
## If `skip` is given, add the passed-over tokens to `extra`
- for i in 0..
= state.tokens.len:
continue
if skip:
@@ -113,6 +70,7 @@ proc advance(state: ref ParseState, amount: int, skip = false) =
let token = state.tokens[state.cursor]
state.token = some(token)
if token.startsWith("-") and '=' in token:
+ # key, value extract for "key value" and "--key=value"
let parts = token.split("=", 1)
state.key = some(parts[0])
state.value = some(parts[1])
@@ -154,22 +112,22 @@ proc safeIdentStr(x: string): string =
for c in x:
case c
of '_':
- if result.len >= 1 and result[result.len-1] != '_':
+ if result.len >= 1 and result[result.len - 1] != '_':
result.add c
- of 'A'..'Z', 'a'..'z', '\x80'..'\xff':
+ of 'A' .. 'Z', 'a' .. 'z', '\x80' .. '\xff':
result.add c
- of '0'..'9':
+ of '0' .. '9':
if result.len >= 1:
result.add c
else:
discard
result.strip(chars = {'_'})
-proc popleft*[T](s: var seq[T]):T =
+proc popleft*[T](s: var seq[T]): T =
## Pop from the front of a seq
result = s[0]
when (NimMajor, NimMinor, NimPatch) >= (1, 6, 0):
- s.delete(0..0)
+ s.delete(0 .. 0)
else:
s.delete(0, 0)
@@ -178,7 +136,7 @@ proc popright*[T](s: var seq[T], n = 0): T =
let idx = s.len - n - 1
result = s[idx]
when (NimMajor, NimMinor, NimPatch) >= (1, 6, 0):
- s.delete(idx..idx)
+ s.delete(idx .. idx)
else:
s.delete(idx, idx)
@@ -188,26 +146,21 @@ proc popright*[T](s: var seq[T], n = 0): T =
proc identDef(varname: NimNode, vartype: NimNode): NimNode =
## Return a property definition for an object.
- ##
- ## type
+ ##
+ ## ```type
## Foo = object
- ## varname*: vartype <-- this is the AST being returned
+ ## `varname*: vartype` # <-- this is the AST being returned````
return nnkIdentDefs.newTree(
- nnkPostfix.newTree(
- ident("*"),
- varname,
- ),
- vartype,
- newEmptyNode()
+ nnkPostfix.newTree(ident("*"), varname), vartype, newEmptyNode()
)
proc propDefinitions(c: Component): seq[NimNode] =
## Return the type of this component as will be put in the
## parser return type object definition
- ##
- ## type
+ ##
+ ## ```type
## Foo = object
- ## name*: string <-- this is the AST being returned
+ ## name*: string # <-- this is the AST being returned````
let varname = ident(c.varname.safeIdentStr)
case c.kind
of ArgFlag:
@@ -222,10 +175,7 @@ proc propDefinitions(c: Component): seq[NimNode] =
result.add identDef(varname, ident("string"))
result.add identDef(
ident(safeIdentStr(c.varname & "_opt")),
- nnkBracketExpr.newTree(
- ident("Option"),
- ident("string")
- )
+ nnkBracketExpr.newTree(ident("Option"), ident("string")),
)
of ArgArgument:
if c.nargs != 1:
@@ -236,33 +186,38 @@ proc propDefinitions(c: Component): seq[NimNode] =
#--------------------------------------------------------------
# Builder
#--------------------------------------------------------------
-
proc newBuilder*(name = ""): Builder =
new(result)
result.name = name
- result.symbol = genSym(nskLet, if name == "": "Argparse" else: name.safeIdentStr).toStrLit.strVal
+ result.symbol =
+ genSym(nskLet, if name == "": "Argparse" else: name.safeIdentStr).toStrLit.strVal
result.children = newSeq[Builder]()
result.runProcBodies = newSeq[NimNode]()
+ result.components = newSeq[Component]()
result.components.add Component(
kind: ArgFlag,
varname: "argparse_help",
- shortCircuit: true,
+ help: "Help",
flagShort: "-h",
flagLong: "--help",
+ flagMultiple: false,
+ shortCircuit: true,
)
-proc `$`*(b: Builder): string = $(b[])
+ let isTopLevel = builderStack.len == 0
+ # Option for completion generation
+ if isTopLevel:
+ result.components.add COMPLETION_OPT
+ result.components.add COMPLETION_FLAG
+
+proc `$`*(b: Builder): string =
+ $(b[])
proc optsIdent(b: Builder): NimNode =
## Name of the option type for this Builder
# let name = if b.name == "": "Argparse" else: b.name
ident("Opts" & b.symbol)
-proc parserIdent(b: Builder): NimNode =
- ## Name of the parser type for this Builder
- # let name = if b.name == "": "Argparse" else: b.name
- ident("Parser" & b.symbol)
-
proc optsTypeDef*(b: Builder): NimNode =
## Generate the type definition for the return value of parsing:
var properties = nnkRecList.newTree()
@@ -274,23 +229,15 @@ proc optsTypeDef*(b: Builder): NimNode =
properties.add(component.propDefinitions())
if b.parent.isSome:
properties.add nnkIdentDefs.newTree(
- nnkPostfix.newTree(
- ident("*"),
- ident("parentOpts")
- ),
- nnkRefTy.newTree(
- b.parent.get().optsIdent,
- ),
- newEmptyNode()
+ nnkPostfix.newTree(ident("*"), ident("parentOpts")),
+ nnkRefTy.newTree(b.parent.get().optsIdent),
+ newEmptyNode(),
)
-
+
if b.children.len > 0:
# .argparse_command
properties.add nnkIdentDefs.newTree(
- nnkPostfix.newTree(
- ident("*"),
- ident("argparse_command"),
- ),
+ nnkPostfix.newTree(ident("*"), ident("argparse_command")),
ident("string"),
newEmptyNode(),
)
@@ -300,40 +247,28 @@ proc optsTypeDef*(b: Builder): NimNode =
let childOptsIdent = child.optsIdent()
properties.add nnkIdentDefs.newTree(
nnkPostfix.newTree(
- ident("*"),
- ident("argparse_" & child.name.toVarname() & "_opts")
- ),
- nnkBracketExpr.newTree(
- ident("Option"),
- nnkRefTy.newTree(childOptsIdent)
+ ident("*"), ident("argparse_" & child.name.toVarname() & "_opts")
),
- newEmptyNode()
+ nnkBracketExpr.newTree(ident("Option"), nnkRefTy.newTree(childOptsIdent)),
+ newEmptyNode(),
)
# type MyOpts = object
result = nnkTypeDef.newTree(
b.optsIdent(),
newEmptyNode(),
- nnkObjectTy.newTree(
- newEmptyNode(),
- newEmptyNode(),
- properties,
- )
+ nnkObjectTy.newTree(newEmptyNode(), newEmptyNode(), properties),
)
proc parserTypeDef*(b: Builder): NimNode =
## Generate the type definition for the Parser object:
- ##
+ ##
## type
## MyParser = object
result = nnkTypeDef.newTree(
b.parserIdent(),
newEmptyNode(),
- nnkObjectTy.newTree(
- newEmptyNode(),
- newEmptyNode(),
- newEmptyNode(),
- )
+ nnkObjectTy.newTree(newEmptyNode(), newEmptyNode(), newEmptyNode()),
)
proc raiseShortCircuit*(flagname: string, help: string) {.inline.} =
@@ -344,15 +279,16 @@ proc raiseShortCircuit*(flagname: string, help: string) {.inline.} =
e.help = help
raise e
+
proc parseProcDef*(b: Builder): NimNode =
## Generate the parse proc for this Builder
- ##
- ## proc parse(p: MyParser, args: seq[string]): MyOpts =
+ ##
+ ## `proc parse(p: MyParser, args: seq[string]): MyOpts =`
result = newStmtList()
-
+
let parserIdent = b.parserIdent()
let optsIdent = b.optsIdent()
-
+
# flag/opt/arg handlers
var flagCase = newCaseStatement(parseExpr("token"))
var optCase = newCaseStatement(parseExpr("key"))
@@ -364,14 +300,14 @@ proc parseProcDef*(b: Builder): NimNode =
of ArgFlag:
var matches: seq[string]
if component.flagShort != "":
- matches.add(component.flagShort) # of "-h":
+ matches.add(component.flagShort) # of "-h":
if component.flagLong != "":
- matches.add(component.flagLong) # of "--help":
+ matches.add(component.flagLong) # of "--help":
var body = newStmtList()
if component.shortCircuit:
- let varname = newStrLitNode(component.varname)
+ let varnameNode = newStrLitNode(component.varname)
body.add quote do:
- raiseShortCircuit(`varname`, parser.help)
+ raiseShortCircuit(`varnameNode`, parser.help)
else:
if component.flagMultiple:
let varname = ident(component.varname)
@@ -394,11 +330,12 @@ proc parseProcDef*(b: Builder): NimNode =
# Set default from environment variable
let dft = newStrLitNode(component.optDefault.get(""))
let env = newStrLitNode(component.env)
+ let envValExpr = newCall("getEnv", env, dft)
setDefaults.add quote do:
- opts.`varname` = getEnv(`env`, `dft`)
+ opts.`varname` = `envValExpr`
if component.optDefault.isSome:
setDefaults.add quote do:
- opts.`varname_opt` = some(getEnv(`env`, `dft`))
+ opts.`varname_opt` = some(`envValExpr`)
elif component.optDefault.isSome:
# Set default
let dft = component.optDefault.get()
@@ -408,15 +345,24 @@ proc parseProcDef*(b: Builder): NimNode =
var matches: seq[string]
var optCombo: string
if component.optShort != "":
- matches.add(component.optShort) # of "-h"
+ matches.add(component.optShort) # of "-h"
optCombo.add component.optShort
if component.optLong != "":
- matches.add(component.optLong) # of "--help"
+ matches.add(component.optLong) # of "--help"
if optCombo != "":
optCombo.add ","
optCombo.add(component.optLong)
let optComboNode = newStrLitNode(optCombo)
+ # Additional hard code behaviours for options,
+ let hotwire: NimNode = block:
+ if component.varname == COMPLETION_OPT_VARNAME:
+ let varnameNode = newStrLitNode(component.varname)
+ quote:
+ raiseShortCircuit(`varnameNode`, "Printing completion definitions")
+ else:
+ parseExpr("discard \"no hotwire\"")
+
# Make sure it has a value
let valueGuard = quote do:
if state.value.isNone:
@@ -428,14 +374,20 @@ proc parseProcDef*(b: Builder): NimNode =
let choices = component.optChoices
choiceGuard = quote do:
if state.value.get() notin `choices`:
- raise UsageError.newException("Invalid value for " & `optComboNode` & ": " & state.value.get() & " (valid choices: " & $`choices` & ")")
-
+ raise UsageError.newException(
+ "Invalid value for " & `optComboNode` & ": " & state.value.get() &
+ " (valid choices: " & $`choices` & ")"
+ )
+
# Make sure required options have been provided
if component.optRequired:
let envStr = newStrLitNode(component.env)
requiredOptionGuard.add quote do:
- if `optComboNode` notin switches_seen and (`envStr` == "" or getEnv(`envStr`) == ""):
- raise UsageError.newException("Option " & `optComboNode` & " is required and was not provided")
+ if `optComboNode` notin switches_seen and
+ (`envStr` == "" or getEnv(`envStr`) == ""):
+ raise UsageError.newException(
+ "Option " & `optComboNode` & " is required and was not provided"
+ )
# Make sure it hasn't been provided twice
var duplicateGuard: NimNode
@@ -451,20 +403,18 @@ proc parseProcDef*(b: Builder): NimNode =
# -o single
duplicateGuard = quote do:
if `optComboNode` in switches_seen:
- raise UsageError.newException("Option " & `optComboNode` & " supplied multiple times")
+ raise UsageError.newException(
+ "Option " & `optComboNode` & " supplied multiple times"
+ )
switches_seen.add(`optComboNode`)
body = quote do:
opts.`varname` = state.value.get()
opts.`varname_opt` = some(opts.`varname`)
state.consume(ArgOption)
+ `hotwire` # internal shortcircuit for options
continue
if not body.isNil:
- optCase.add(matches, newStmtList(
- valueGuard,
- choiceGuard,
- duplicateGuard,
- body,
- ))
+ optCase.add(matches, newStmtList(valueGuard, choiceGuard, duplicateGuard, body))
of ArgArgument:
# Process positional arguments
if component.nargs == -1:
@@ -475,31 +425,37 @@ proc parseProcDef*(b: Builder): NimNode =
filler.optional(component.varname)
let envStr = newStrLitNode(component.env)
let dftStr = newStrLitNode(component.argDefault.get(""))
- setDefaults.add replaceNodes(quote do:
- opts.`varname` = getEnv(`envStr`, `dftStr`)
+ setDefaults.add replaceNodes(
+ quote do:
+ opts.`varname` = getEnv(`envStr`, `dftStr`)
)
elif component.argDefault.isSome:
filler.optional(component.varname)
let dftStr = newStrLitNode(component.argDefault.get())
- setDefaults.add replaceNodes(quote do:
- opts.`varname` = `dftStr`
+ setDefaults.add replaceNodes(
+ quote do:
+ opts.`varname` = `dftStr`
)
else:
filler.required(component.varname, 1)
elif component.nargs > 1:
filler.required(component.varname, component.nargs)
-
+
# args proc
let minArgs = newIntLitNode(filler.minArgs)
var argcase = newCaseStatement(parseExpr("state.extra.len"))
if filler.minArgs > 0:
- for nargs in 0.. 0:
# There are extra args.
- raise UsageError.newException("Unknown argument(s): " & state.extra.join(", "))
+ raise
+ UsageError.newException("Unknown argument(s): " & state.extra.join(", "))
`runProcs`
except ShortCircuit as e:
- if e.flag == "argparse_help" and runblocks:
- output.write(parser.help())
- if quitOnHelp:
- quit(1)
- else:
+ if runblocks: # Run, hook in internal custom behaviour (help, completns)
+ block handler:
+ if e.flag == "argparse_help": # if
+ output.write(parser.help())
+ if quitOnHelp:
+ quit(1)
+ break handler
+ when `isRootBuilder` and `isCompletionsEnabled`:
+ if e.flag in [`completionOptVarname`, `completionFlagVarname`]:
+ `doCompletionsShort`
+ #quit(1)
+ break handler
+ raise e # else
+ else: # parse only
raise e
result.add(replaceNodes(parseProc))
# Convenience parse/run procs
- result.add replaceNodes(quote do:
- proc parse(parser: `parserIdent`, args: seq[string], quitOnHelp = true): ref `optsIdent` {.used.} =
- ## Parse arguments using the `parserIdent` parser
- var state = newParseState(args)
- var opts: ref `optsIdent`
- new(opts)
- parser.parse(opts, state, quitOnHelp = quitOnHelp)
- result = opts
+ result.add(
+ quote do:
+ proc parse(
+ parser: `parserIdent`, args: seq[string], quitOnHelp = true
+ ): ref `optsIdent` {.used.} =
+ ## Parse arguments using the `parserIdent` parser
+ var state = newParseState(args)
+ var opts: ref `optsIdent`
+ new(opts)
+ parser.parse(opts, state, quitOnHelp = quitOnHelp)
+ result = opts
+
)
# proc parse() with no args
- result.add replaceNodes(quote do:
- proc parse(parser: `parserIdent`, quitOnHelp = true): ref `optsIdent` {.used.} =
- ## Parse command line params
- when declared(commandLineParams):
- parser.parse(toSeq(commandLineParams()), quitOnHelp = quitOnHelp)
- else:
- var params: seq[string]
- for i in 0..paramCount():
- params.add(paramStr(i))
- parser.parse(params, quitOnHelp = quitOnHelp)
+ result.add replaceNodes(
+ quote do:
+ proc parse(parser: `parserIdent`, quitOnHelp = true): ref `optsIdent` {.used.} =
+ ## Parse command line params
+ when declared(commandLineParams):
+ parser.parse(toSeq(commandLineParams()), quitOnHelp = quitOnHelp)
+ else:
+ var params: seq[string] = @[]
+ for i in 0 .. paramCount():
+ params.add(paramStr(i))
+ parser.parse(params, quitOnHelp = quitOnHelp)
+
)
- result.add replaceNodes(quote do:
- proc run(parser: `parserIdent`, args: seq[string], quitOnHelp = true, output:Stream = ARGPARSE_STDOUT) {.used.} =
- ## Run the matching run-blocks of the parser
- var state = newParseState(args)
- var opts: ref `optsIdent`
- new(opts)
- parser.parse(opts, state, runblocks = true, quitOnHelp = quitOnHelp, output = output)
+ result.add replaceNodes(
+ quote do:
+ proc run(
+ parser: `parserIdent`,
+ args: seq[string],
+ quitOnHelp = true,
+ output: Stream = ARGPARSE_STDOUT,
+ ) {.used.} =
+ ## Run the matching run-blocks of the parser
+ var state = newParseState(args)
+ var opts: ref `optsIdent`
+ new(opts)
+ parser.parse(
+ opts, state, runblocks = true, quitOnHelp = quitOnHelp, output = output
+ )
+
)
# proc run() with no args
- result.add replaceNodes(quote do:
- proc run(parser: `parserIdent`) {.used.} =
- ## Run the matching run-blocks of the parser
- when declared(commandLineParams):
- parser.run(toSeq(commandLineParams()))
- else:
- var params: seq[string]
- for i in 0..paramCount():
- params.add(paramStr(i))
- parser.run(params)
+ result.add replaceNodes(
+ quote do:
+ proc run(parser: `parserIdent`) {.used.} =
+ ## Run the matching run-blocks of the parser
+ when declared(commandLineParams):
+ parser.run(toSeq(commandLineParams()))
+ else:
+ var params: seq[string] = @[]
+ for i in 0 .. paramCount():
+ params.add(paramStr(i))
+ parser.run(params)
+
)
# Shorter named convenience procs
if b.children.len > 0:
# .argparse_command -> .command shortcut
- result.add replaceNodes(quote do:
- proc command(opts: ref `optsIdent`): string {.used, inline.} =
- opts.argparse_command
+ result.add replaceNodes(
+ quote do:
+ proc command(opts: ref `optsIdent`): string {.used, inline.} =
+ opts.argparse_command
+
)
# .argparse_NAME_opts -> .NAME shortcut
for child in b.children:
let name = ident(child.name)
let fulloptname = ident("argparse_" & child.name.toVarname & "_opts")
- let retval = nnkBracketExpr.newTree(
- ident("Option"),
- nnkRefTy.newTree(child.optsIdent())
- )
- result.add replaceNodes(quote do:
- proc `name`(opts: ref `optsIdent`): `retval` {.used, inline.} =
- opts.`fulloptname`
+ let retval =
+ nnkBracketExpr.newTree(ident("Option"), nnkRefTy.newTree(child.optsIdent()))
+ result.add replaceNodes(
+ quote do:
+ proc `name`(opts: ref `optsIdent`): `retval` {.used, inline.} =
+ opts.`fulloptname`
+
)
proc setOrAdd*(x: var string, val: string) =
@@ -692,12 +716,20 @@ proc getHelpText*(b: Builder): string =
result.add("\L\L")
# usage
- var usage_parts:seq[string]
+ var usage_parts: seq[string]
- proc firstline(s:string):string =
+ proc firstline(s: string): string =
s.split("\L")[0]
- proc formatOption(flags:string, helptext:string, defaultval = none[string](), envvar:string = "", choices:seq[string] = @[], opt_width = 26, max_width = 100):string =
+ proc formatOption(
+ flags: string,
+ helptext: string,
+ defaultval = none[string](),
+ envvar: string = "",
+ choices: seq[string] = @[],
+ opt_width = 26,
+ max_width = 100,
+ ): string =
result.add(" " & flags)
var helptext = helptext
if choices.len > 0:
@@ -711,7 +743,7 @@ proc getHelpText*(b: Builder): string =
if flags.len > opt_width:
result.add("\L")
result.add(" ")
- result.add(" ".repeat(opt_width+1))
+ result.add(" ".repeat(opt_width + 1))
result.add(helptext)
else:
result.add(" ".repeat(opt_width - flags.len))
@@ -726,25 +758,33 @@ proc getHelpText*(b: Builder): string =
case comp.kind
of ArgFlag:
if not comp.hidden:
- var flag_parts: seq[string]
- if comp.flagShort != "":
- flag_parts.add(comp.flagShort)
- if comp.flagLong != "":
- flag_parts.add(comp.flagLong)
- opts.add(formatOption(flag_parts.join(", "), comp.help))
- opts.add("\L")
+ var flag_parts: seq[string]
+ if comp.flagShort != "":
+ flag_parts.add(comp.flagShort)
+ if comp.flagLong != "":
+ flag_parts.add(comp.flagLong)
+ opts.add(formatOption(flag_parts.join(", "), comp.help))
+ opts.add("\L")
of ArgOption:
if not comp.hidden:
- var flag_parts: seq[string]
- if comp.optShort != "":
- flag_parts.add(comp.optShort)
- if comp.optLong != "":
- flag_parts.add(comp.optLong)
- var flags = flag_parts.join(", ") & "=" & comp.varname.toUpper()
- opts.add(formatOption(flags, comp.help, defaultval = comp.optDefault, envvar = comp.env, choices = comp.optChoices))
- opts.add("\L")
+ var flag_parts: seq[string]
+ if comp.optShort != "":
+ flag_parts.add(comp.optShort)
+ if comp.optLong != "":
+ flag_parts.add(comp.optLong)
+ var flags = flag_parts.join(", ") & "=" & comp.varname.toUpper()
+ opts.add(
+ formatOption(
+ flags,
+ comp.help,
+ defaultval = comp.optDefault,
+ envvar = comp.env,
+ choices = comp.optChoices,
+ )
+ )
+ opts.add("\L")
of ArgArgument:
- var leftside:string
+ var leftside: string
if comp.nargs == 1:
leftside = comp.varname
if comp.argDefault.isSome:
@@ -754,10 +794,18 @@ proc getHelpText*(b: Builder): string =
else:
leftside = (&"{comp.varname} ").repeat(comp.nargs)
usage_parts.add(leftside)
- args.add(formatOption(leftside, comp.help, defaultval = comp.argDefault, envvar = comp.env, opt_width=16))
+ args.add(
+ formatOption(
+ leftside,
+ comp.help,
+ defaultval = comp.argDefault,
+ envvar = comp.env,
+ opt_width = 16,
+ )
+ )
args.add("\L")
-
- var commands = newOrderedTable[string,string](2)
+
+ var commands = newOrderedTable[string, string](2)
if b.children.len > 0:
usage_parts.add("COMMAND")
@@ -767,7 +815,9 @@ proc getHelpText*(b: Builder): string =
if not commands.hasKey(group):
commands[group] = ""
let indent = if group == "": "" else: " "
- commands[group].add(indent & formatOption(leftside, subbuilder.help.firstline, opt_width=16))
+ commands[group].add(
+ indent & formatOption(leftside, subbuilder.help.firstline, opt_width = 16)
+ )
commands[group].add("\L")
if usage_parts.len > 0 or opts != "":
@@ -806,23 +856,18 @@ proc getHelpText*(b: Builder): string =
proc helpProcDef*(b: Builder): NimNode =
## Generate the help proc for the parser
let helptext = b.getHelpText()
- let prog = newStrLitNode(b.name)
let parserIdent = b.parserIdent()
result = newStmtList()
- result.add replaceNodes(quote do:
- proc help(parser: `parserIdent`): string {.used.} =
- ## Get the help string for this parser
- var prog = `prog`
- if prog == "":
- prog = getAppFilename().extractFilename()
- result.add `helptext`.replace("{prog}", prog)
+ var getProgNameAst: NimNode = b.getProgNameAst()
+ result.add replaceNodes(
+ quote do:
+ proc help(parser: `parserIdent`): string {.used.} =
+ ## Get the help string for this parser
+ result.add `helptext`.replace("{prog}", `getProgNameAst`)
+
)
-type
- GenResponse* = tuple
- types: NimNode
- procs: NimNode
- instance: NimNode
+type GenResponse* = tuple[types: NimNode, procs: NimNode, instance: NimNode]
proc addParser*(name: string, group: string, content: proc()): Builder =
## Add a parser (whether main parser or subcommand) and return the Builder
@@ -838,7 +883,7 @@ proc addParser*(name: string, group: string, content: proc()): Builder =
# subcommand
builderStack[^1].children.add(builder)
builder.parent = some(builderStack[^1])
-
+
return builder
proc add_runProc*(body: NimNode) {.compileTime.} =
@@ -860,7 +905,7 @@ proc generateDefs*(builder: Builder): NimNode =
result = newStmtList()
var typeSection = nnkTypeSection.newTree()
var procsSection = newStmtList()
-
+
# children first to avoid forward declarations
for child in builder.allChildren().reversed:
typeSection.add child.optsTypeDef()
@@ -882,10 +927,11 @@ proc generateDefs*(builder: Builder): NimNode =
# let parser = MyParser()
# parser
let parserIdent = builder.parserIdent()
- let instantiationSection = quote do:
+ let instantiationSection = quote:
var parser = `parserIdent`()
parser
-
+
result.add(typeSection)
result.add(procsSection)
result.add(instantiationSection)
+ #echo result.repr
diff --git a/src/argparse/shellcompletion/fish.nim b/src/argparse/shellcompletion/fish.nim
new file mode 100644
index 0000000..226d16c
--- /dev/null
+++ b/src/argparse/shellcompletion/fish.nim
@@ -0,0 +1,147 @@
+import std/[strformat, strutils, sequtils, options, sets, algorithm]
+import ../types
+
+const COMPLETION_HEADER_FISH* = "# Autogenerated fish shell completions \n"
+
+# The command name is determined at runtime (based on binary name) so is
+# templated as {prog} for replacing at runtime.
+template startCompleteCommand(): untyped =
+ result = "complete -c {prog} " # {prog} to be replaced at runtime
+
+template addFlag(short: string, long: string, require: bool = true): untyped =
+ if require and short == "" and long == "":
+ raise ValueError.newException(
+ "At least one of short or long flag must be provided for flag completion"
+ )
+ if short != "":
+ result &= "-s " & short[1 ..^ 1] & " "
+ if long != "":
+ result &= "-l " & long[2 ..^ 1] & " "
+
+template addHelp(): untyped =
+ if help != "":
+ result &= "-d '$#' " % [help.replace("'", "\\'")]
+
+template addCompletions(): untyped =
+ if completionsGenerator == "" and completionsList.len == 0:
+ discard
+ else:
+ let completionsStr = completionsList.join(" ")
+
+ result &= "-a \""
+ if completionsStr != "":
+ result &= completionsStr & " "
+ if completionsGenerator != "":
+ result &= "(" & completionsGenerator & ")"
+ result &= "\" "
+
+template scopeSubcommand(): untyped =
+ if subcommandPath.len > 0:
+ result &= "-n '"
+ result &= &"__fish_seen_subcommand_from {subcommandPath[0]}"
+ for subc {.inject.} in subcommandPath[1 ..^ 1]:
+ result &= &";and __fish_seen_subcommand_from {subc}"
+ for subc {.inject.} in untraversedSubcommands:
+ result &= &";and not __fish_seen_subcommand_from {subc}"
+ result &= "' "
+
+proc getFishShellCompletion(
+ subcommands: openArray[string],
+ help: string = "",
+ subcommandPath: openArray[string] = @[],
+ untraversedSubcommands: openArray[string] = @[],
+ noFiles = true,
+): string {.compiletime.} =
+ ## Adds subcommands
+ template addSubcommands(): untyped =
+ if subcommands.len > 0:
+ if subcommandPath.len == 0:
+ result &= "-n '__fish_use_subcommand' "
+ result &= "-a '" & subcommands.join(" ") & "' "
+
+ startCompleteCommand()
+ addhelp()
+ scopeSubcommand()
+ if noFiles:
+ result &= "-f " # no file completions, option to come
+ addSubcommands()
+
+proc getFishShellCompletion(
+ component: Component,
+ untraversedSubcommands: openArray[string] = @[], # block these completions
+ subcommandPath: openArray[string] = @[], # for subcommands, the path to this command
+ noFiles = true,
+): string {.compiletime.} =
+ ## Adds arguments
+ startCompleteCommand()
+ let help = component.help
+ addhelp()
+ scopeSubcommand()
+ case component.kind
+ of ArgOption: # require option string, add completions for it
+ let
+ completionsList = component.optChoices
+ completionsGenerator = component.optCompletionsGenerator[sckFish]
+ result &= "-r " # a flag requires argument if the flag given
+ if noFiles or completionsList.len > 0:
+ result &= "-f "
+ addFlag(component.optShort, component.optLong) # ArgFlag/ArgOption
+ addCompletions()
+ of ArgFlag:
+ addFlag(component.flagShort, component.flagLong)
+ of ArgArgument:
+ let completionsList: seq[string] = @[]
+ let completionsGenerator = component.argCompletionsGenerator[sckFish]
+ addCompletions()
+
+# Importing backend will create a circular dep
+proc allChildren*(builder: Builder): seq[Builder] =
+ ## Return all the descendents of this builder
+ for child in builder.children:
+ result.add child
+ result.add child.allChildren()
+
+proc getFishShellCompletionsTemplate*(
+ b: Builder, allSubcommandsPre: Option[HashSet[string]] = none[HashSet[string]]()
+): seq[string] {.compiletime.} =
+ ## Get the completion definitions for the target shell
+ ##
+ ## allSubcommands can be passed in to avoid recomputing it for subcommands
+ ##
+ ## Return a list of completion commands for fish shell sans the command itself
+ result = newSeq[string]()
+ result.add COMPLETION_HEADER_FISH
+
+ var subcommandPath: seq[string] = @[]
+ var bCursor = some(b)
+ while bCursor.get().parent.isSome:
+ subcommandPath.add bCursor.get().name
+ bCursor = bCursor.get().parent
+ subcommandPath.reverse() # top down
+
+ # bCursor is top-level
+ let allSubcommands =
+ if allSubcommandsPre.isNone():
+ some(bCursor.get().allChildren().mapIt(it.name).toHashSet())
+ else:
+ allSubcommandsPre
+
+ let untraversedSubcommands = (allSubcommands.get() - subcommandPath.toHashSet).toSeq
+ # argument completions
+ for c in b.components:
+ result.add getFishShellCompletion(
+ component = c,
+ subcommandPath = subcommandPath,
+ untraversedSubcommands = untraversedSubcommands,
+ )
+ # subcommand completions
+ for child in b.children:
+ result.add getFishShellCompletion(
+ subcommands = [child.name],
+ help = child.help,
+ subcommandPath = subcommandPath,
+ untraversedSubcommands = untraversedSubcommands,
+ )
+ # underneath subcommand argument completions
+ for child in b.children:
+ result.add child.getFishShellCompletionsTemplate(allSubcommandsPre)
diff --git a/src/argparse/shellcompletion/shellcompletion.nim b/src/argparse/shellcompletion/shellcompletion.nim
new file mode 100644
index 0000000..592ba6e
--- /dev/null
+++ b/src/argparse/shellcompletion/shellcompletion.nim
@@ -0,0 +1,150 @@
+## .. importdoc:: ../backend, ../types
+## # Architecture
+## ## Compiletime
+## - Hooks added to `argparse/backend module`_
+## - hotwire, triggers short circuit on completion option
+## - shortcircuit, triggered by standart mechanism on completion flag
+## - Handler for shortcircuit generated by `getShortCircuitBehaviourImpl`_
+## - Process env SHELL to derive target shell
+## - Print completions
+## - Implementation for completion printing in module specific to shell
+##
+## ### Further Detail
+## - completion generation occurs at compiletime and persists to runtime
+## - const array indexed by `ShellCompletionKind` containing completions
+## - lookup at runtime based on user input
+#
+## # Notes
+## Fish completions are declarative, but other shells are procedural,
+## consequentially its not easy to abstract completion generation to a unified
+## interface thus each shell should have its own module for handling its own
+## specifics
+import std/[sequtils, macros, strutils, options]
+# We will not import backend here to avoid circular dependencies
+import ../types, fish
+import ../util
+
+const COMPLETION_OPT_VARNAME* = "shell"
+const COMPLETION_FLAG_VARNAME* = "printCompletions"
+const COMPLETION_SHELLS* = toSeq(ShellCompletionKind).mapIt($it)
+const COMPLETION_LONG_FLAG* = "completionDefinitions"
+const COMPLETION_LONG_HELP* =
+ "Print shell completion definitions for given shell"
+const COMPLETION_SHORT_FLAG* = "c"
+const COMPLETION_SHORT_HELP* = "Print shell completion definitions for env $SHELL"
+const COMPLETION_DEFINITIONS_CONST_NAME = "COMPLETION_DEFINITIONS"
+const COMPLETION_HEADER* = "# Autogenerated shell completions \n"
+const COMPLETION_OPT* = Component(
+ varname: COMPLETION_OPT_VARNAME,
+ help: COMPLETION_LONG_HELP,
+ kind: ArgOption,
+ env: "SHELL",
+ optLong: "--" & COMPLETION_LONG_FLAG,
+ optChoices: COMPLETION_SHELLS,
+ optRequired: false,
+)
+const COMPLETION_FLAG* = Component(
+ varname: COMPLETION_FLAG_VARNAME,
+ help: COMPLETION_SHORT_HELP,
+ kind: ArgFlag,
+ flagShort: "-" & COMPLETION_SHORT_FLAG,
+ shortCircuit: true,
+)
+
+proc deriveShellFromEnvVar*(envVar: string): string =
+ envVar.split("/")[^1]
+
+proc getCompletionDefinitionsConstDef(b: Builder): NimNode {.compiletime.} =
+ ## Produce const definition for shell completion definitions. This should be
+ ## called in non global scope that is specific to the builder/parser which it
+ ## belongs to.
+ if b.parent.isSome():
+ raise newException(
+ ValueError, "getCompletionsConstDef can only be called on top-level Builders"
+ )
+
+ # array[ShellCompletionKind,string]
+ let constType =
+ nnkBracketExpr.newTree(ident"array", ident"ShellCompletionKind", ident"string")
+
+ # Build array literal: [sckFish: "completions...", ...]
+ var arrayElements = nnkBracket.newTree()
+ let header = COMPLETION_HEADER
+ for shell in ShellCompletionKind.low .. ShellCompletionKind.high:
+ let completions: seq[string] = block:
+ case shell
+ of sckFish:
+ getFishShellCompletionsTemplate(b)
+ arrayElements.add newLit(header & completions.join("\n"))
+
+ # const COMPLETION_DEFINITIONS: array[ShellCompletionKind, string] = [...]
+ nnkConstSection.newTree(
+ nnkConstDef.newTree(
+ ident(COMPLETION_DEFINITIONS_CONST_NAME), constType, arrayElements
+ )
+ )
+
+proc getCompletionDefinitionsProcDef(b: Builder): NimNode {.compiletime.} =
+ ## Produce proc to return completion statements for target shell argument
+ ## for given builder (there may be more than one builder in a program)
+ ##
+ ## proc getCompletionDefinitions() will use the const `getCompletionsConstIdent`_
+ ##
+ ## #Notes
+ ## Result to ultimately be executed by the target shell
+ newProc(
+ name = ident"getCompletionDefinitions",
+ params = [
+ ident"string",
+ newIdentDefs(ident"parser", b.parserIdent()),
+ newIdentDefs(ident"shell", ident"ShellCompletionKind"),
+ ],
+ procType = nnkProcDef,
+ body = nnkStmtList.newTree(
+ newLetStmt(ident"progname", b.getProgNameAst()),
+ # return COMPLETION_DEFINITIONS_CONST_NAME[shell].replace("{prog}", progname)
+ nnkReturnStmt.newTree(
+ nnkCall.newTree(
+ nnkDotExpr.newTree(
+ nnkBracketExpr.newTree(
+ ident(COMPLETION_DEFINITIONS_CONST_NAME), ident"shell"
+ ),
+ ident"replace",
+ ),
+ newLit"{prog}",
+ ident"progname",
+ )
+ ),
+ ),
+ )
+
+proc getShortCircuitBehaviourImpl*(b: Builder): NimNode =
+ ## AST implementing behaviour to enact on a shortcircuit for completions
+ ##
+ ## Executed at runtime in the context of parse() declared at [parseProcDef_]
+ ##
+ ## Called when user passed completions flag or option. Where they passed the
+ ## flag pull the shell from env var SHELL. Where they passed the option
+ ## use that. Where they passed the flag and the option use the option.
+
+ ## `parser`, and `output`. The AST of `getCompletionDefinitionsProcDef`_ shall
+ ## have been injected and in scope before this AST is executed.
+ result = newStmtList()
+
+ result.add b.getCompletionDefinitionsConstDef()
+ result.add b.getCompletionDefinitionsProcDef()
+ let optAccess = newDotExpr(ident"opts", ident(COMPLETION_OPT_VARNAME))
+ result.add quote do:
+ let shellStr:string = when compiles(`optAccess`):
+ # given the short flag this will be the SHELL env value, so derive shell
+ deriveShellFromEnvVar(`optAccess`)
+ else:
+ # opt disabled, short flag given
+ deriveShellFromEnvVar(getEnv("SHELL"))
+ let shell = try:
+ parseEnum[ShellCompletionKind](shellStr)
+ except CatchableError:
+ raise UsageError.newException("Invalid shell for completions: " & shellStr)
+
+ output.writeLine(parser.getCompletionDefinitions(shell))
+
diff --git a/src/argparse/types.nim b/src/argparse/types.nim
new file mode 100644
index 0000000..980e96b
--- /dev/null
+++ b/src/argparse/types.nim
@@ -0,0 +1,60 @@
+import std/[options]
+type
+ UsageError* = object of ValueError
+
+ ShortCircuit* = object of CatchableError
+ flag*: string
+ help*: string
+
+ ShellCompletionKind* = enum
+ sckFish = "fish"
+ #sckBash = "bash" not implemented
+ #sckZsh = "zsh" not implemented
+
+ ComponentKind* = enum
+ ArgFlag
+ ArgOption
+ ArgArgument
+
+ Component* = object
+ varname*: string
+ hidden*: bool
+ help*: string
+ env*: string
+ case kind*: ComponentKind
+ of ArgFlag:
+ flagShort*: string
+ flagLong*: string
+ flagMultiple*: bool
+ shortCircuit*: bool
+ of ArgOption:
+ optShort*: string
+ optLong*: string
+ optMultiple*: bool
+ optDefault*: Option[string]
+ optChoices*: seq[string]
+ optCompletionsGenerator*: array[ShellCompletionKind, string]
+ optRequired*: bool
+ of ArgArgument:
+ nargs*: int
+ argDefault*: Option[string]
+ argCompletionsGenerator*: array[ShellCompletionKind, string]
+
+ Builder* = ref BuilderObj
+ BuilderObj* {.acyclic.} = object
+ ## A compile-time object used to accumulate parser options
+ ## before building the parser
+ name*: string
+ ## Command name for subcommand parsers, or program name for
+ ## the parent parser.
+ symbol*: string
+ ## Unique tag to apply to Parser and Option types to avoid
+ ## conflicts. By default, this is generated with Nim's
+ ## gensym algorithm.
+ components*: seq[Component]
+ help*: string
+ groupName*: string
+ children*: seq[Builder]
+ parent*: Option[Builder]
+ runProcBodies*: seq[NimNode]
+
\ No newline at end of file
diff --git a/src/argparse/util.nim b/src/argparse/util.nim
new file mode 100644
index 0000000..6f14f7c
--- /dev/null
+++ b/src/argparse/util.nim
@@ -0,0 +1,29 @@
+## Utilities used by multiple modules.
+##
+## + Avoids circular dependencies.
+## + Better module cohesion, all logic within more closely aligned to a purpose
+
+import types
+import std/[macros,options]
+
+proc getProgNameAst*(b:Builder): NimNode {.compiletime.}=
+ ## Get the program name for help text and completions
+ ##
+ ## if `b.name` == "": getAppFilename().extractFilename() else: `b.name`
+ if b.name == "":
+ result = newCall(newDotExpr(newCall("getAppFilename"), ident("extractFilename")))
+ else:
+ result = newLit(b.name)
+
+proc parserIdent*(b: Builder): NimNode =
+ ## Name of the parser type for this Builder
+ # let name = if b.name == "": "Argparse" else: b.name
+ ident("Parser" & b.symbol)
+
+proc getRootBuilder*(b: Builder): Builder {.compiletime.} =
+ ## Get the root builder for this builder
+ var current = b
+ while current.parent.isSome:
+ current = current.parent.get()
+ current
+
diff --git a/tests/test1.nim b/tests/test1.nim
index 3f360b4..e77c0b1 100644
--- a/tests/test1.nim
+++ b/tests/test1.nim
@@ -8,18 +8,7 @@ import strformat
import strutils
import unittest
-proc shlex(x:string):seq[string] =
- # XXX this is not accurate, but okay enough for testing
- if x == "":
- result = @[]
- else:
- result = x.split({' '})
-
-template withEnv(name:string, value:string, body:untyped):untyped =
- let old_value = getEnv(name, "")
- putEnv(name, value)
- body
- putEnv(name, old_value)
+import ./util
suite "flags":
test "short flags":
@@ -71,6 +60,7 @@ suite "flags":
var p = newParser:
flag("-a", "--apple", help="Some apples")
flag("--banana-split-and-ice-cream", help="More help")
+ noCompletions()
flag("-c", multiple=true)
check "Some apples" in p.help
diff --git a/tests/testBackend.nim b/tests/testBackend.nim
index ce6a713..93b68a2 100644
--- a/tests/testBackend.nim
+++ b/tests/testBackend.nim
@@ -1,5 +1,5 @@
import unittest
-import argparse/backend
+import argparse/[backend,types]
suite "ParseState":
diff --git a/tests/testShellCompletions.nim b/tests/testShellCompletions.nim
new file mode 100644
index 0000000..f3e2797
--- /dev/null
+++ b/tests/testShellCompletions.nim
@@ -0,0 +1,173 @@
+import std/[unittest,envvars,strformat,osproc]
+import argparse, argparse/shellcompletion/[shellcompletion,fish]
+import ./util
+
+
+template checkAndFish(conditon: untyped, msg: string): untyped =
+ check conditon, msg
+
+test "Print":
+ var o = newStringStream()
+ var p = newParser("mycmd"):
+ flag("-a")
+
+ # no completions printed by default
+ p.run(shlex "-a", output=o)
+ o.setPosition(0)
+ check o.atEnd() or not o.readLine().contains(COMPLETION_HEADER[0 ..^ 2])
+
+ # # print completions with short flag
+ o = newStringStream()
+ p.run(shlex "-"&COMPLETION_SHORT_FLAG, output = o)
+ o.setPosition(0)
+ check o.readLine().contains(COMPLETION_HEADER[0 ..^ 2])
+
+ # print completions with long flag + shell
+ o = newStringStream()
+ p.run(shlex "--" & COMPLETION_LONG_FLAG & " fish", output = o)
+ o.setPosition(0)
+ check o.readLine().contains(COMPLETION_HEADER[0 ..^ 2])
+
+suite "Help":
+ test "Completion option help":
+ var p = newParser("a"):
+ flag("-a")
+ var o = newStringStream()
+ p.run(shlex"-h", quitOnHelp = false, output = o)
+ o.setPosition(0)
+ var mout = o.readAll()
+ check "--" & COMPLETION_LONG_FLAG in mout
+ test "Completion flag help":
+ var p = newParser("a"):
+ flag("-a")
+ var o = newStringStream()
+ p.run(shlex"-h", quitOnHelp = false, output = o)
+ o.setPosition(0)
+ var mout = o.readAll()
+ check COMPLETION_SHORT_HELP in mout
+suite "Disable":
+ test "Completion disable":
+ var q = newParser("b"):
+ noCompletions()
+ flag("-b")
+ var r = newStringStream()
+ q.run(shlex"-h", quitOnHelp = false, output = r)
+ var mout = r.readAll()
+ check "--" & COMPLETION_LONG_FLAG notin mout
+ check COMPLETION_SHORT_HELP notin mout
+
+ expect UsageError:
+ q.run(shlex"-c")
+ expect UsageError:
+ q.run(shlex "--" & COMPLETION_LONG_FLAG & " fish")
+
+ test "Disable completion option leave flag":
+ var p = newParser("a"):
+ flag("-a")
+ # without short
+ noCompletions(disableFlag=false)
+ var o = newStringStream()
+ p.run(shlex"-h", quitOnHelp = false, output = o)
+ o.setPosition(0)
+ var mout = o.readAll()
+ check "--" & COMPLETION_LONG_FLAG notin mout
+ check COMPLETION_SHORT_HELP in mout
+
+ expect UsageError:
+ p.run(shlex "--" & COMPLETION_LONG_FLAG & " fish", quitOnHelp = false)
+
+ o = newStringStream()
+ p.run(shlex "-" & COMPLETION_SHORT_FLAG, output=o)
+ o.setPosition(0)
+ check COMPLETION_HEADER[0..^2] in o.readAll()
+
+ test "Disable completion flag leave option":
+ var q = newParser("b"):
+ flag("-b")
+ # without long
+ noCompletions(disableOpt=false)
+ var o = newStringStream()
+ q.run(shlex"-h", quitOnHelp = false, output = o)
+ o.setPosition(0)
+ var mout = o.readAll()
+ check "--" & COMPLETION_LONG_FLAG in mout
+ check COMPLETION_SHORT_HELP notin mout
+
+ expect UsageError: # short flag not present
+ q.run(shlex "-" & COMPLETION_SHORT_FLAG)
+
+ o = newStringStream()
+ q.run(shlex "--" & COMPLETION_LONG_FLAG & " fish", output = o)
+ o.setPosition(0)
+ check COMPLETION_HEADER[0..^2] in o.readAll()
+suite "Environment":
+ test "Shell from environment":
+ putenv("SHELL", "/usr/bin/fish")
+ var p= newParser("mycmd"):
+ flag("-a")
+ var o = newStringStream()
+ p.run(shlex "-" & COMPLETION_SHORT_FLAG, output = o)
+ o.setPosition(0)
+ check o.readall().split("\n").contains(COMPLETION_HEADER_FISH[0..^2])
+
+ putEnv("SHELL", "/usr/bin/ush")
+ var q = newParser("mycmd"):
+ flag("-a")
+ expect UsageError:
+ q.run(shlex "-" & COMPLETION_SHORT_FLAG, output = o)
+ test "Option overrides environment":
+ putenv("SHELL", "/usr/bin/ush")
+ var p = newParser("mycmd"):
+ flag("-a")
+ var o = newStringStream()
+ p.run(shlex "--" & COMPLETION_LONG_FLAG & " fish", output = o)
+ o.setPosition(0)
+ check o.readall().split("\n").contains(COMPLETION_HEADER_FISH[0..^2])
+
+suite "Hide":
+ test "Hide completions from help":
+ var p = newParser("mycmd"):
+ flag("-a")
+ hideCompletions()
+ var o = newStringStream()
+ p.run(shlex"-h", quitOnHelp = false, output = o)
+ o.setPosition(0)
+ var mout = o.readAll()
+ check "--" & COMPLETION_LONG_FLAG notin mout
+ check COMPLETION_SHORT_HELP notin mout
+
+suite "Completion generators":
+ test "Any directory in pwd":
+ const completionsGenerator: array[ShellCompletionKind,string] = [
+ sckFish: "__fish_complete_directories"
+ ]
+ const pidsGenerator: array[ShellCompletionKind,string] = [
+ sckFish: "ps -eo pid= | awk '{print $1}'"
+ ]
+ var p = newParser("mycmd"):
+ arg("dir", help="a directory", completionsGenerator=completionsGenerator)
+ option("--opt", help="an option", completionsGenerator=pidsGenerator)
+ var o = newStringStream()
+ p.run(shlex "--" & COMPLETION_LONG_FLAG & " fish", output = o)
+ o.setPosition(0)
+ var completions: string = o.readAll()
+ check completions.contains("__fish_complete_directories")
+ check completions.contains("ps -eo pid= | awk '{print $1}'")
+
+
+suite "Validity":
+ for shell in COMPLETION_SHELLS:
+ test &"{shell} shell":
+ if findExe(shell) == "":
+ skip()
+ else:
+ var p = newParser("mycmd"):
+ flag("-a", help="an option")
+ option("--opt", help="an option with argument")
+ arg("files", help="input files")
+ var o = newStringStream()
+ p.run(shlex "--" & COMPLETION_LONG_FLAG & " " & shell, output = o)
+ o.setPosition(0)
+ var completions: string = o.readAll()
+ var outEx = execCmdEx(&"{shell} -c \"source /dev/stdin\"", input=completions)
+ check outEx.exitCode == 0
\ No newline at end of file
diff --git a/tests/util.nim b/tests/util.nim
new file mode 100644
index 0000000..b8a0fd8
--- /dev/null
+++ b/tests/util.nim
@@ -0,0 +1,13 @@
+import std/[strutils]
+proc shlex*(x:string):seq[string] =
+ # XXX this is not accurate, but okay enough for testing
+ if x == "":
+ result = @[]
+ else:
+ result = x.split({' '})
+
+template withEnv*(name:string, value:string, body:untyped):untyped =
+ let old_value = getEnv(name, "")
+ putEnv(name, value)
+ body
+ putEnv(name, old_value)