mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
fmt: fix alignment of enumeration types (#21999)
This commit is contained in:
parent
3247b98bb5
commit
79ee4ae046
51 changed files with 543 additions and 479 deletions
|
@ -4,11 +4,11 @@ import time
|
||||||
|
|
||||||
pub enum MessageKind {
|
pub enum MessageKind {
|
||||||
compile_begin // sent right before *each* _test.v file compilation, the resulting status is not known yet, but the _test.v file itself is
|
compile_begin // sent right before *each* _test.v file compilation, the resulting status is not known yet, but the _test.v file itself is
|
||||||
compile_end // sent right after *each* _test.v file compilation, the message contains the output of that compilation
|
compile_end // sent right after *each* _test.v file compilation, the message contains the output of that compilation
|
||||||
cmd_begin // sent right before *each* _test.v file execution, the resulting status is not known yet, but the _test.v file itself is
|
cmd_begin // sent right before *each* _test.v file execution, the resulting status is not known yet, but the _test.v file itself is
|
||||||
cmd_end // sent right after *each* _test.v file execution, the message contains the output of that execution
|
cmd_end // sent right after *each* _test.v file execution, the message contains the output of that execution
|
||||||
//
|
//
|
||||||
ok // success of a _test.v file
|
ok // success of a _test.v file
|
||||||
fail // failed _test.v file, one or more assertions failed
|
fail // failed _test.v file, one or more assertions failed
|
||||||
skip // the _test.v file was skipped for some reason
|
skip // the _test.v file was skipped for some reason
|
||||||
info // a generic information message, detailing the actions of the `v test` program (some tests could be repeated for example, and the details are sent with an .info status)
|
info // a generic information message, detailing the actions of the `v test` program (some tests could be repeated for example, and the details are sent with an .info status)
|
||||||
|
|
|
@ -73,14 +73,14 @@ enum FnType {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum DeclType {
|
enum DeclType {
|
||||||
include_ // #include ...
|
include_ // #include ...
|
||||||
const_ // const ...
|
const_ // const ...
|
||||||
type_ // type ...
|
type_ // type ...
|
||||||
enum_ // enum ...
|
enum_ // enum ...
|
||||||
fn_ // fn ...
|
fn_ // fn ...
|
||||||
struct_ // struct ...
|
struct_ // struct ...
|
||||||
interface_ // interface ...
|
interface_ // interface ...
|
||||||
stmt_ // statement
|
stmt_ // statement
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_repl(folder string) Repl {
|
fn new_repl(folder string) Repl {
|
||||||
|
|
|
@ -124,8 +124,8 @@ pub fn (mut ctx Context) should_test_dir(path string, backend string) ([]string,
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ShouldTestStatus {
|
enum ShouldTestStatus {
|
||||||
test // do test, print OK or FAIL, depending on if it passes
|
test // do test, print OK or FAIL, depending on if it passes
|
||||||
skip // print SKIP for the test
|
skip // print SKIP for the test
|
||||||
ignore // just ignore the file, so it will not be printed at all in the list of tests
|
ignore // just ignore the file, so it will not be printed at all in the list of tests
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3443,7 +3443,7 @@ Enums can be created from string or integer value and converted into string
|
||||||
```v
|
```v
|
||||||
enum Cycle {
|
enum Cycle {
|
||||||
one
|
one
|
||||||
two = 2
|
two = 2
|
||||||
three
|
three
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5852,7 +5852,7 @@ You can read [Enum](#enums) values and their attributes.
|
||||||
|
|
||||||
```v
|
```v
|
||||||
enum Color {
|
enum Color {
|
||||||
red @[RED] // first attribute
|
red @[RED] // first attribute
|
||||||
blue @[BLUE] // second attribute
|
blue @[BLUE] // second attribute
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,13 @@ import os
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
enum Item_type {
|
enum Item_type {
|
||||||
file = 0
|
file = 0
|
||||||
folder
|
folder
|
||||||
// archive format
|
// archive format
|
||||||
zip = 16
|
zip = 16
|
||||||
archive_file
|
archive_file
|
||||||
// graphic format, MUST stay after the other types!!
|
// graphic format, MUST stay after the other types!!
|
||||||
bmp = 32
|
bmp = 32
|
||||||
jpg
|
jpg
|
||||||
png
|
png
|
||||||
gif
|
gif
|
||||||
|
|
|
@ -24,8 +24,8 @@ pub:
|
||||||
pub enum ArrayFlags {
|
pub enum ArrayFlags {
|
||||||
noslices // when <<, `.noslices` will free the old data block immediately (you have to be sure, that there are *no slices* to that specific array). TODO: integrate with reference counting/compiler support for the static cases.
|
noslices // when <<, `.noslices` will free the old data block immediately (you have to be sure, that there are *no slices* to that specific array). TODO: integrate with reference counting/compiler support for the static cases.
|
||||||
noshrink // when `.noslices` and `.noshrink` are *both set*, .delete(x) will NOT allocate new memory and free the old. It will just move the elements in place, and adjust .len.
|
noshrink // when `.noslices` and `.noshrink` are *both set*, .delete(x) will NOT allocate new memory and free the old. It will just move the elements in place, and adjust .len.
|
||||||
nogrow // the array will never be allowed to grow past `.cap`. set `.nogrow` and `.noshrink` for a truly fixed heap array
|
nogrow // the array will never be allowed to grow past `.cap`. set `.nogrow` and `.noshrink` for a truly fixed heap array
|
||||||
nofree // `.data` will never be freed
|
nofree // `.data` will never be freed
|
||||||
}
|
}
|
||||||
|
|
||||||
// Internal function, used by V (`nums := []int`)
|
// Internal function, used by V (`nums := []int`)
|
||||||
|
|
|
@ -145,9 +145,9 @@ pub:
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum AttributeKind {
|
pub enum AttributeKind {
|
||||||
plain // [name]
|
plain // [name]
|
||||||
string // ['name']
|
string // ['name']
|
||||||
number // [123]
|
number // [123]
|
||||||
comptime_define // [if name]
|
comptime_define // [if name]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ pub enum ZSTD_cParameter {
|
||||||
// to default. Setting this will however eventually dynamically impact the compression
|
// to default. Setting this will however eventually dynamically impact the compression
|
||||||
// parameters which have not been manually set. The manually set
|
// parameters which have not been manually set. The manually set
|
||||||
// ones will 'stick'.
|
// ones will 'stick'.
|
||||||
zstd_c_compression_level = 100
|
zstd_c_compression_level = 100
|
||||||
// Advanced compression parameters :
|
// Advanced compression parameters :
|
||||||
// It's possible to pin down compression parameters to some specific values.
|
// It's possible to pin down compression parameters to some specific values.
|
||||||
// In which case, these values are no longer dynamically selected by the compressor
|
// In which case, these values are no longer dynamically selected by the compressor
|
||||||
|
@ -79,14 +79,14 @@ pub enum ZSTD_cParameter {
|
||||||
// Special: value 0 means "use default windowLog".
|
// Special: value 0 means "use default windowLog".
|
||||||
// Note: Using a windowLog greater than ZSTD_WINDOWLOG_LIMIT_DEFAULT
|
// Note: Using a windowLog greater than ZSTD_WINDOWLOG_LIMIT_DEFAULT
|
||||||
// requires explicitly allowing such size at streaming decompression stage.
|
// requires explicitly allowing such size at streaming decompression stage.
|
||||||
zstd_c_window_log = 101
|
zstd_c_window_log = 101
|
||||||
// Size of the initial probe table, as a power of 2.
|
// Size of the initial probe table, as a power of 2.
|
||||||
// Resulting memory usage is (1 << (hashLog+2)).
|
// Resulting memory usage is (1 << (hashLog+2)).
|
||||||
// Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX.
|
// Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX.
|
||||||
// Larger tables improve compression ratio of strategies <= dFast,
|
// Larger tables improve compression ratio of strategies <= dFast,
|
||||||
// and improve speed of strategies > dFast.
|
// and improve speed of strategies > dFast.
|
||||||
// Special: value 0 means "use default hashLog".
|
// Special: value 0 means "use default hashLog".
|
||||||
zstd_c_hash_log = 102
|
zstd_c_hash_log = 102
|
||||||
// Size of the multi-probe search table, as a power of 2.
|
// Size of the multi-probe search table, as a power of 2.
|
||||||
// Resulting memory usage is (1 << (chainLog+2)).
|
// Resulting memory usage is (1 << (chainLog+2)).
|
||||||
// Must be clamped between ZSTD_CHAINLOG_MIN and ZSTD_CHAINLOG_MAX.
|
// Must be clamped between ZSTD_CHAINLOG_MIN and ZSTD_CHAINLOG_MAX.
|
||||||
|
@ -95,12 +95,12 @@ pub enum ZSTD_cParameter {
|
||||||
// It's still useful when using "dfast" strategy,
|
// It's still useful when using "dfast" strategy,
|
||||||
// in which case it defines a secondary probe table.
|
// in which case it defines a secondary probe table.
|
||||||
// Special: value 0 means "use default chainLog".
|
// Special: value 0 means "use default chainLog".
|
||||||
zstd_c_chain_log = 103
|
zstd_c_chain_log = 103
|
||||||
// Number of search attempts, as a power of 2.
|
// Number of search attempts, as a power of 2.
|
||||||
// More attempts result in better and slower compression.
|
// More attempts result in better and slower compression.
|
||||||
// This parameter is useless for "fast" and "dFast" strategies.
|
// This parameter is useless for "fast" and "dFast" strategies.
|
||||||
// Special: value 0 means "use default searchLog".
|
// Special: value 0 means "use default searchLog".
|
||||||
zstd_c_search_log = 104
|
zstd_c_search_log = 104
|
||||||
// Minimum size of searched matches.
|
// Minimum size of searched matches.
|
||||||
// Note that Zstandard can still find matches of smaller size,
|
// Note that Zstandard can still find matches of smaller size,
|
||||||
// it just tweaks its search algorithm to look for this size and larger.
|
// it just tweaks its search algorithm to look for this size and larger.
|
||||||
|
@ -109,7 +109,7 @@ pub enum ZSTD_cParameter {
|
||||||
// Note that currently, for all strategies < btopt, effective minimum is 4.
|
// Note that currently, for all strategies < btopt, effective minimum is 4.
|
||||||
// , for all strategies > fast, effective maximum is 6.
|
// , for all strategies > fast, effective maximum is 6.
|
||||||
// Special: value 0 means "use default minMatchLength".
|
// Special: value 0 means "use default minMatchLength".
|
||||||
zstd_c_min_match = 105
|
zstd_c_min_match = 105
|
||||||
// Impact of this field depends on strategy.
|
// Impact of this field depends on strategy.
|
||||||
// For strategies btopt, btultra & btultra2:
|
// For strategies btopt, btultra & btultra2:
|
||||||
// Length of Match considered "good enough" to stop search.
|
// Length of Match considered "good enough" to stop search.
|
||||||
|
@ -118,12 +118,12 @@ pub enum ZSTD_cParameter {
|
||||||
// Distance between match sampling.
|
// Distance between match sampling.
|
||||||
// Larger values make compression faster, and weaker.
|
// Larger values make compression faster, and weaker.
|
||||||
// Special: value 0 means "use default targetLength".
|
// Special: value 0 means "use default targetLength".
|
||||||
zstd_c_target_length = 106
|
zstd_c_target_length = 106
|
||||||
// See ZSTD_strategy enum definition.
|
// See ZSTD_strategy enum definition.
|
||||||
// The higher the value of selected strategy, the more complex it is,
|
// The higher the value of selected strategy, the more complex it is,
|
||||||
// resulting in stronger and slower compression.
|
// resulting in stronger and slower compression.
|
||||||
// Special: value 0 means "use default strategy".
|
// Special: value 0 means "use default strategy".
|
||||||
zstd_c_strategy = 107
|
zstd_c_strategy = 107
|
||||||
// LDM mode parameters
|
// LDM mode parameters
|
||||||
// Enable long distance matching.
|
// Enable long distance matching.
|
||||||
// This parameter is designed to improve compression ratio
|
// This parameter is designed to improve compression ratio
|
||||||
|
@ -140,34 +140,34 @@ pub enum ZSTD_cParameter {
|
||||||
// Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX
|
// Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX
|
||||||
// default: windowlog - 7.
|
// default: windowlog - 7.
|
||||||
// Special: value 0 means "automatically determine hashlog".
|
// Special: value 0 means "automatically determine hashlog".
|
||||||
zstd_c_ldm_hash_log = 161
|
zstd_c_ldm_hash_log = 161
|
||||||
// Minimum match size for long distance matcher.
|
// Minimum match size for long distance matcher.
|
||||||
// Larger/too small values usually decrease compression ratio.
|
// Larger/too small values usually decrease compression ratio.
|
||||||
// Must be clamped between ZSTD_LDM_MINMATCH_MIN and ZSTD_LDM_MINMATCH_MAX.
|
// Must be clamped between ZSTD_LDM_MINMATCH_MIN and ZSTD_LDM_MINMATCH_MAX.
|
||||||
// Special: value 0 means "use default value" (default: 64).
|
// Special: value 0 means "use default value" (default: 64).
|
||||||
zstd_c_ldm_min_match = 162
|
zstd_c_ldm_min_match = 162
|
||||||
// log size of each bucket in the ldm hash table for collision resolution.
|
// log size of each bucket in the ldm hash table for collision resolution.
|
||||||
// Larger values improve collision resolution but decrease compression speed.
|
// Larger values improve collision resolution but decrease compression speed.
|
||||||
// The maximum value is ZSTD_LDM_BUCKETSIZELOG_MAX.
|
// The maximum value is ZSTD_LDM_BUCKETSIZELOG_MAX.
|
||||||
// Special: value 0 means "use default value" (default: 3).
|
// Special: value 0 means "use default value" (default: 3).
|
||||||
zstd_c_ldm_bucket_size_log = 163
|
zstd_c_ldm_bucket_size_log = 163
|
||||||
// Frequency of inserting/looking up entries into the LDM hash table.
|
// Frequency of inserting/looking up entries into the LDM hash table.
|
||||||
// Must be clamped between 0 and (ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN).
|
// Must be clamped between 0 and (ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN).
|
||||||
// Default is MAX(0, (windowLog - ldmHashLog)), optimizing hash table usage.
|
// Default is MAX(0, (windowLog - ldmHashLog)), optimizing hash table usage.
|
||||||
// Larger values improve compression speed.
|
// Larger values improve compression speed.
|
||||||
// Deviating far from default value will likely result in a compression ratio decrease.
|
// Deviating far from default value will likely result in a compression ratio decrease.
|
||||||
// Special: value 0 means "automatically determine hashRateLog".
|
// Special: value 0 means "automatically determine hashRateLog".
|
||||||
zstd_c_ldm_hash_rate_log = 164
|
zstd_c_ldm_hash_rate_log = 164
|
||||||
// frame parameters
|
// frame parameters
|
||||||
// Content size will be written into frame header _whenever known_ (default:1)
|
// Content size will be written into frame header _whenever known_ (default:1)
|
||||||
// Content size must be known at the beginning of compression.
|
// Content size must be known at the beginning of compression.
|
||||||
// This is automatically the case when using ZSTD_compress2(),
|
// This is automatically the case when using ZSTD_compress2(),
|
||||||
// For streaming scenarios, content size must be provided with ZSTD_CCtx_setPledgedSrcSize()
|
// For streaming scenarios, content size must be provided with ZSTD_CCtx_setPledgedSrcSize()
|
||||||
zstd_c_content_size_flag = 200
|
zstd_c_content_size_flag = 200
|
||||||
// A 32-bits checksum of content is written at end of frame (default:0)
|
// A 32-bits checksum of content is written at end of frame (default:0)
|
||||||
zstd_c_checksum_flag = 201
|
zstd_c_checksum_flag = 201
|
||||||
// When applicable, dictionary's ID is written into frame header (default:1)
|
// When applicable, dictionary's ID is written into frame header (default:1)
|
||||||
zstd_c_dict_id_flag = 202
|
zstd_c_dict_id_flag = 202
|
||||||
// multi-threading parameters
|
// multi-threading parameters
|
||||||
// These parameters are only active if multi-threading is enabled (compiled with build macro ZSTD_MULTITHREAD).
|
// These parameters are only active if multi-threading is enabled (compiled with build macro ZSTD_MULTITHREAD).
|
||||||
// Otherwise, trying to set any other value than default (0) will be a no-op and return an error.
|
// Otherwise, trying to set any other value than default (0) will be a no-op and return an error.
|
||||||
|
@ -183,13 +183,13 @@ pub enum ZSTD_cParameter {
|
||||||
// More workers improve speed, but also increase memory usage.
|
// More workers improve speed, but also increase memory usage.
|
||||||
// Default value is `0`, aka "single-threaded mode" : no worker is spawned,
|
// Default value is `0`, aka "single-threaded mode" : no worker is spawned,
|
||||||
// compression is performed inside Caller's thread, and all invocations are blocking
|
// compression is performed inside Caller's thread, and all invocations are blocking
|
||||||
zstd_c_nb_workers = 400
|
zstd_c_nb_workers = 400
|
||||||
// Size of a compression job. This value is enforced only when nbWorkers >= 1.
|
// Size of a compression job. This value is enforced only when nbWorkers >= 1.
|
||||||
// Each compression job is completed in parallel, so this value can indirectly impact the nb of active threads.
|
// Each compression job is completed in parallel, so this value can indirectly impact the nb of active threads.
|
||||||
// 0 means default, which is dynamically determined based on compression parameters.
|
// 0 means default, which is dynamically determined based on compression parameters.
|
||||||
// Job size must be a minimum of overlap size, or ZSTDMT_JOBSIZE_MIN (= 512 KB), whichever is largest.
|
// Job size must be a minimum of overlap size, or ZSTDMT_JOBSIZE_MIN (= 512 KB), whichever is largest.
|
||||||
// The minimum size is automatically and transparently enforced.
|
// The minimum size is automatically and transparently enforced.
|
||||||
zstd_c_job_size = 401
|
zstd_c_job_size = 401
|
||||||
// Control the overlap size, as a fraction of window size.
|
// Control the overlap size, as a fraction of window size.
|
||||||
// The overlap size is an amount of data reloaded from previous job at the beginning of a new job.
|
// The overlap size is an amount of data reloaded from previous job at the beginning of a new job.
|
||||||
// It helps preserve compression ratio, while each job is compressed in parallel.
|
// It helps preserve compression ratio, while each job is compressed in parallel.
|
||||||
|
@ -202,7 +202,7 @@ pub enum ZSTD_cParameter {
|
||||||
// Each intermediate rank increases/decreases load size by a factor 2 :
|
// Each intermediate rank increases/decreases load size by a factor 2 :
|
||||||
// 9: full window; 8: w/2; 7: w/4; 6: w/8; 5:w/16; 4: w/32; 3:w/64; 2:w/128; 1:no overlap; 0:default
|
// 9: full window; 8: w/2; 7: w/4; 6: w/8; 5:w/16; 4: w/32; 3:w/64; 2:w/128; 1:no overlap; 0:default
|
||||||
// default value varies between 6 and 9, depending on strategy
|
// default value varies between 6 and 9, depending on strategy
|
||||||
zstd_c_overlap_log = 402
|
zstd_c_overlap_log = 402
|
||||||
// note : additional experimental parameters are also available
|
// note : additional experimental parameters are also available
|
||||||
// within the experimental section of the API.
|
// within the experimental section of the API.
|
||||||
// At the time of this writing, they include :
|
// At the time of this writing, they include :
|
||||||
|
@ -227,25 +227,25 @@ pub enum ZSTD_cParameter {
|
||||||
// note : never ever use experimentalParam? names directly;
|
// note : never ever use experimentalParam? names directly;
|
||||||
// also, the enums values themselves are unstable and can still change.
|
// also, the enums values themselves are unstable and can still change.
|
||||||
//
|
//
|
||||||
zstd_c_experimental_param1 = 500
|
zstd_c_experimental_param1 = 500
|
||||||
zstd_c_experimental_param2 = 10
|
zstd_c_experimental_param2 = 10
|
||||||
zstd_c_experimental_param3 = 1000
|
zstd_c_experimental_param3 = 1000
|
||||||
zstd_c_experimental_param4 = 1001
|
zstd_c_experimental_param4 = 1001
|
||||||
zstd_c_experimental_param5 = 1002
|
zstd_c_experimental_param5 = 1002
|
||||||
zstd_c_experimental_param6 = 1003
|
zstd_c_experimental_param6 = 1003
|
||||||
zstd_c_experimental_param7 = 1004
|
zstd_c_experimental_param7 = 1004
|
||||||
zstd_c_experimental_param8 = 1005
|
zstd_c_experimental_param8 = 1005
|
||||||
zstd_c_experimental_param9 = 1006
|
zstd_c_experimental_param9 = 1006
|
||||||
zstd_c_experimental_param10 = 1007
|
zstd_c_experimental_param10 = 1007
|
||||||
zstd_c_experimental_param11 = 1008
|
zstd_c_experimental_param11 = 1008
|
||||||
zstd_c_experimental_param12 = 1009
|
zstd_c_experimental_param12 = 1009
|
||||||
zstd_c_experimental_param13 = 1010
|
zstd_c_experimental_param13 = 1010
|
||||||
zstd_c_experimental_param14 = 1011
|
zstd_c_experimental_param14 = 1011
|
||||||
zstd_c_experimental_param15 = 1012
|
zstd_c_experimental_param15 = 1012
|
||||||
zstd_c_experimental_param16 = 1013
|
zstd_c_experimental_param16 = 1013
|
||||||
zstd_c_experimental_param17 = 1014
|
zstd_c_experimental_param17 = 1014
|
||||||
zstd_c_experimental_param18 = 1015
|
zstd_c_experimental_param18 = 1015
|
||||||
zstd_c_experimental_param19 = 1016
|
zstd_c_experimental_param19 = 1016
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ZSTD_bounds {
|
pub struct ZSTD_bounds {
|
||||||
|
@ -274,7 +274,7 @@ pub enum ZSTD_dParameter {
|
||||||
// This parameter is only useful in streaming mode, since no internal buffer is allocated in single-pass mode.
|
// This parameter is only useful in streaming mode, since no internal buffer is allocated in single-pass mode.
|
||||||
// By default, a decompression context accepts window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT).
|
// By default, a decompression context accepts window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT).
|
||||||
// Special: value 0 means "use default maximum windowLog".
|
// Special: value 0 means "use default maximum windowLog".
|
||||||
zstd_d_window_log_max = 100
|
zstd_d_window_log_max = 100
|
||||||
// note : additional experimental parameters are also available
|
// note : additional experimental parameters are also available
|
||||||
// within the experimental section of the API.
|
// within the experimental section of the API.
|
||||||
// At the time of this writing, they include :
|
// At the time of this writing, they include :
|
||||||
|
@ -321,13 +321,13 @@ pub enum ZSTD_EndDirective {
|
||||||
// it creates (at least) one new block, that can be decoded immediately on reception;
|
// it creates (at least) one new block, that can be decoded immediately on reception;
|
||||||
// frame will continue: any future data can still reference previously compressed data, improving compression.
|
// frame will continue: any future data can still reference previously compressed data, improving compression.
|
||||||
// note : multithreaded compression will block to flush as much output as possible.
|
// note : multithreaded compression will block to flush as much output as possible.
|
||||||
zstd_e_flush = 1
|
zstd_e_flush = 1
|
||||||
// flush any remaining data _and_ close current frame.
|
// flush any remaining data _and_ close current frame.
|
||||||
// note that frame is only closed after compressed data is fully flushed (return value == 0).
|
// note that frame is only closed after compressed data is fully flushed (return value == 0).
|
||||||
// After that point, any additional data starts a new frame.
|
// After that point, any additional data starts a new frame.
|
||||||
// note : each frame is independent (does not reference any content from previous frame).
|
// note : each frame is independent (does not reference any content from previous frame).
|
||||||
// note : multithreaded compression will block to flush as much output as possible.
|
// note : multithreaded compression will block to flush as much output as possible.
|
||||||
zstd_e_end = 2
|
zstd_e_end = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
fn C.ZSTD_compressStream2(voidptr, &ZSTD_outBuffer, &ZSTD_inBuffer, ZSTD_EndDirective) usize
|
fn C.ZSTD_compressStream2(voidptr, &ZSTD_outBuffer, &ZSTD_inBuffer, ZSTD_EndDirective) usize
|
||||||
|
|
|
@ -22,7 +22,7 @@ pub enum FieldType {
|
||||||
type_timestamp2
|
type_timestamp2
|
||||||
type_datetime2
|
type_datetime2
|
||||||
type_time2
|
type_time2
|
||||||
type_json = 245
|
type_json = 245
|
||||||
type_newdecimal
|
type_newdecimal
|
||||||
type_enum
|
type_enum
|
||||||
type_set
|
type_set
|
||||||
|
|
|
@ -80,34 +80,34 @@ pub struct C.PGresult {}
|
||||||
pub struct C.PGconn {}
|
pub struct C.PGconn {}
|
||||||
|
|
||||||
pub enum ConnStatusType {
|
pub enum ConnStatusType {
|
||||||
ok = C.CONNECTION_OK
|
ok = C.CONNECTION_OK
|
||||||
bad = C.CONNECTION_BAD
|
bad = C.CONNECTION_BAD
|
||||||
// Non-blocking mode only below here
|
// Non-blocking mode only below here
|
||||||
// The existence of these should never be relied upon - they should only be used for user feedback or similar purposes.
|
// The existence of these should never be relied upon - they should only be used for user feedback or similar purposes.
|
||||||
started = C.CONNECTION_STARTED // Waiting for connection to be made.
|
started = C.CONNECTION_STARTED // Waiting for connection to be made.
|
||||||
made = C.CONNECTION_MADE // Connection OK; waiting to send.
|
made = C.CONNECTION_MADE // Connection OK; waiting to send.
|
||||||
awaiting_response = C.CONNECTION_AWAITING_RESPONSE // Waiting for a response from the postmaster.
|
awaiting_response = C.CONNECTION_AWAITING_RESPONSE // Waiting for a response from the postmaster.
|
||||||
auth_ok = C.CONNECTION_AUTH_OK // Received authentication; waiting for backend startup.
|
auth_ok = C.CONNECTION_AUTH_OK // Received authentication; waiting for backend startup.
|
||||||
setenv = C.CONNECTION_SETENV // Negotiating environment.
|
setenv = C.CONNECTION_SETENV // Negotiating environment.
|
||||||
ssl_startup = C.CONNECTION_SSL_STARTUP // Negotiating SSL.
|
ssl_startup = C.CONNECTION_SSL_STARTUP // Negotiating SSL.
|
||||||
needed = C.CONNECTION_NEEDED // Internal state: connect() needed . Available in PG 8
|
needed = C.CONNECTION_NEEDED // Internal state: connect() needed . Available in PG 8
|
||||||
check_writable = C.CONNECTION_CHECK_WRITABLE // Check if we could make a writable connection. Available since PG 10
|
check_writable = C.CONNECTION_CHECK_WRITABLE // Check if we could make a writable connection. Available since PG 10
|
||||||
consume = C.CONNECTION_CONSUME // Wait for any pending message and consume them. Available since PG 10
|
consume = C.CONNECTION_CONSUME // Wait for any pending message and consume them. Available since PG 10
|
||||||
gss_startup = C.CONNECTION_GSS_STARTUP // Negotiating GSSAPI; available since PG 12
|
gss_startup = C.CONNECTION_GSS_STARTUP // Negotiating GSSAPI; available since PG 12
|
||||||
}
|
}
|
||||||
|
|
||||||
@[typedef]
|
@[typedef]
|
||||||
pub enum ExecStatusType {
|
pub enum ExecStatusType {
|
||||||
empty_query = C.PGRES_EMPTY_QUERY // empty query string was executed
|
empty_query = C.PGRES_EMPTY_QUERY // empty query string was executed
|
||||||
command_ok = C.PGRES_COMMAND_OK // a query command that doesn't return anything was executed properly by the backend
|
command_ok = C.PGRES_COMMAND_OK // a query command that doesn't return anything was executed properly by the backend
|
||||||
tuples_ok = C.PGRES_TUPLES_OK // a query command that returns tuples was executed properly by the backend, PGresult contains the result tuples
|
tuples_ok = C.PGRES_TUPLES_OK // a query command that returns tuples was executed properly by the backend, PGresult contains the result tuples
|
||||||
copy_out = C.PGRES_COPY_OUT // Copy Out data transfer in progress
|
copy_out = C.PGRES_COPY_OUT // Copy Out data transfer in progress
|
||||||
copy_in = C.PGRES_COPY_IN // Copy In data transfer in progress
|
copy_in = C.PGRES_COPY_IN // Copy In data transfer in progress
|
||||||
bad_response = C.PGRES_BAD_RESPONSE // an unexpected response was recv'd from the backend
|
bad_response = C.PGRES_BAD_RESPONSE // an unexpected response was recv'd from the backend
|
||||||
nonfatal_error = C.PGRES_NONFATAL_ERROR // notice or warning message
|
nonfatal_error = C.PGRES_NONFATAL_ERROR // notice or warning message
|
||||||
fatal_error = C.PGRES_FATAL_ERROR // query failed
|
fatal_error = C.PGRES_FATAL_ERROR // query failed
|
||||||
copy_both = C.PGRES_COPY_BOTH // Copy In/Out data transfer in progress
|
copy_both = C.PGRES_COPY_BOTH // Copy In/Out data transfer in progress
|
||||||
single_tuple = C.PGRES_SINGLE_TUPLE // single tuple from larger resultset
|
single_tuple = C.PGRES_SINGLE_TUPLE // single tuple from larger resultset
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -19,12 +19,12 @@ struct FlagContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum Style {
|
pub enum Style {
|
||||||
short // Posix short only, allows multiple shorts -def is `-d -e -f` and "sticky" arguments e.g.: `-ofoo` = `-o foo`
|
short // Posix short only, allows multiple shorts -def is `-d -e -f` and "sticky" arguments e.g.: `-ofoo` = `-o foo`
|
||||||
long // GNU style long option *only*. E.g.: `--name` or `--name=value`
|
long // GNU style long option *only*. E.g.: `--name` or `--name=value`
|
||||||
short_long // extends `posix` style shorts with GNU style long options: `--flag` or `--name=value`
|
short_long // extends `posix` style shorts with GNU style long options: `--flag` or `--name=value`
|
||||||
v // V style flags as found in flags for the `v` compiler. Single flag denote `-` followed by string identifier e.g.: `-verbose`, `-name value`, `-v`, `-n value` or `-d ident=value`
|
v // V style flags as found in flags for the `v` compiler. Single flag denote `-` followed by string identifier e.g.: `-verbose`, `-name value`, `-v`, `-n value` or `-d ident=value`
|
||||||
go_flag // GO `flag` module style. Single flag denote `-` followed by string identifier e.g.: `-verbose`, `-name value`, `-v` or `-n value` and both long `--name value` and GNU long `--name=value`
|
go_flag // GO `flag` module style. Single flag denote `-` followed by string identifier e.g.: `-verbose`, `-name value`, `-v` or `-n value` and both long `--name value` and GNU long `--name=value`
|
||||||
cmd_exe // `cmd.exe` style flags. Single flag denote `/` followed by lower- or upper-case character
|
cmd_exe // `cmd.exe` style flags. Single flag denote `/` followed by lower- or upper-case character
|
||||||
}
|
}
|
||||||
|
|
||||||
struct StructInfo {
|
struct StructInfo {
|
||||||
|
|
|
@ -21,11 +21,11 @@ pub enum Align {
|
||||||
|
|
||||||
pub enum ErrorCode {
|
pub enum ErrorCode {
|
||||||
// Font atlas is full.
|
// Font atlas is full.
|
||||||
atlas_full = 1
|
atlas_full = 1
|
||||||
// Scratch memory used to render glyphs is full, requested size reported in 'val', you may need to bump up FONS_SCRATCH_BUF_SIZE.
|
// Scratch memory used to render glyphs is full, requested size reported in 'val', you may need to bump up FONS_SCRATCH_BUF_SIZE.
|
||||||
scratch_full = 2
|
scratch_full = 2
|
||||||
// Calls to fonsPushState has created too large stack, if you need deep state stack bump up FONS_MAX_STATES.
|
// Calls to fonsPushState has created too large stack, if you need deep state stack bump up FONS_MAX_STATES.
|
||||||
states_overflow = 3
|
states_overflow = 3
|
||||||
// Trying to pop too many states fonsPopState().
|
// Trying to pop too many states fonsPopState().
|
||||||
states_underflow = 4
|
states_underflow = 4
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ pub enum MouseButtons {
|
||||||
@[flag]
|
@[flag]
|
||||||
pub enum Modifier {
|
pub enum Modifier {
|
||||||
shift // (1<<0)
|
shift // (1<<0)
|
||||||
ctrl // (1<<1)
|
ctrl // (1<<1)
|
||||||
alt // (1<<2)
|
alt // (1<<2)
|
||||||
super // (1<<3)
|
super // (1<<3)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,10 +80,10 @@ pub enum KeyCode {
|
||||||
x = 88
|
x = 88
|
||||||
y = 89
|
y = 89
|
||||||
z = 90
|
z = 90
|
||||||
left_bracket = 91 //[
|
left_bracket = 91 //[
|
||||||
backslash = 92 //\
|
backslash = 92 //\
|
||||||
right_bracket = 93 //]
|
right_bracket = 93 //]
|
||||||
grave_accent = 96 //`
|
grave_accent = 96 //`
|
||||||
world_1 = 161 // non-us #1
|
world_1 = 161 // non-us #1
|
||||||
world_2 = 162 // non-us #2
|
world_2 = 162 // non-us #2
|
||||||
escape = 256
|
escape = 256
|
||||||
|
|
|
@ -120,10 +120,10 @@ pub enum DOMKeyCode {
|
||||||
x = 88
|
x = 88
|
||||||
y = 89
|
y = 89
|
||||||
z = 90
|
z = 90
|
||||||
left_bracket = 91 //[
|
left_bracket = 91 //[
|
||||||
backslash = 92 //\
|
backslash = 92 //\
|
||||||
right_bracket = 93 //]
|
right_bracket = 93 //]
|
||||||
grave_accent = 96 //`
|
grave_accent = 96 //`
|
||||||
world_1 = 161 // non-us #1
|
world_1 = 161 // non-us #1
|
||||||
world_2 = 162 // non-us #2
|
world_2 = 162 // non-us #2
|
||||||
escape = 256
|
escape = 256
|
||||||
|
|
|
@ -4,11 +4,11 @@ import term
|
||||||
|
|
||||||
// Level defines the possible log levels, used by Log.set_level()
|
// Level defines the possible log levels, used by Log.set_level()
|
||||||
pub enum Level {
|
pub enum Level {
|
||||||
disabled = 0 // lowest level, disables everything else
|
disabled = 0 // lowest level, disables everything else
|
||||||
fatal // disables error, warn, info and debug
|
fatal // disables error, warn, info and debug
|
||||||
error // disables warn, info and debug
|
error // disables warn, info and debug
|
||||||
warn // disables info and debug
|
warn // disables info and debug
|
||||||
info // disables debug
|
info // disables debug
|
||||||
debug
|
debug
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,19 +8,19 @@ import time
|
||||||
|
|
||||||
// TimeFormat define the log time string format, come from time/format.v
|
// TimeFormat define the log time string format, come from time/format.v
|
||||||
pub enum TimeFormat {
|
pub enum TimeFormat {
|
||||||
tf_ss_micro // YYYY-MM-DD HH:mm:ss.123456 (24h) default
|
tf_ss_micro // YYYY-MM-DD HH:mm:ss.123456 (24h) default
|
||||||
tf_default // YYYY-MM-DD HH:mm (24h)
|
tf_default // YYYY-MM-DD HH:mm (24h)
|
||||||
tf_ss // YYYY-MM-DD HH:mm:ss (24h)
|
tf_ss // YYYY-MM-DD HH:mm:ss (24h)
|
||||||
tf_ss_milli // YYYY-MM-DD HH:mm:ss.123 (24h)
|
tf_ss_milli // YYYY-MM-DD HH:mm:ss.123 (24h)
|
||||||
tf_ss_nano // YYYY-MM-DD HH:mm:ss.123456789 (24h)
|
tf_ss_nano // YYYY-MM-DD HH:mm:ss.123456789 (24h)
|
||||||
tf_rfc3339 // YYYY-MM-DDTHH:mm:ss.123Z (24 hours, see https://www.rfc-editor.org/rfc/rfc3339.html)
|
tf_rfc3339 // YYYY-MM-DDTHH:mm:ss.123Z (24 hours, see https://www.rfc-editor.org/rfc/rfc3339.html)
|
||||||
tf_rfc3339_nano // YYYY-MM-DDTHH:mm:ss.123456789Z (24 hours, see https://www.rfc-editor.org/rfc/rfc3339.html)
|
tf_rfc3339_nano // YYYY-MM-DDTHH:mm:ss.123456789Z (24 hours, see https://www.rfc-editor.org/rfc/rfc3339.html)
|
||||||
tf_hhmm // HH:mm (24h)
|
tf_hhmm // HH:mm (24h)
|
||||||
tf_hhmmss // HH:mm:ss (24h)
|
tf_hhmmss // HH:mm:ss (24h)
|
||||||
tf_hhmm12 // hh:mm (12h)
|
tf_hhmm12 // hh:mm (12h)
|
||||||
tf_ymmdd // YYYY-MM-DD
|
tf_ymmdd // YYYY-MM-DD
|
||||||
tf_ddmmy // DD.MM.YYYY
|
tf_ddmmy // DD.MM.YYYY
|
||||||
tf_md // MMM D
|
tf_md // MMM D
|
||||||
tf_custom_format // 'MMMM Do YY N kk:mm:ss A' output like: January 1st 22 AD 13:45:33 PM
|
tf_custom_format // 'MMMM Do YY N kk:mm:ss A' output like: January 1st 22 AD 13:45:33 PM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,185 +22,185 @@ const wsa_v22 = 0x202
|
||||||
// WsaError is all of the socket errors that WSA provides from WSAGetLastError
|
// WsaError is all of the socket errors that WSA provides from WSAGetLastError
|
||||||
pub enum WsaError {
|
pub enum WsaError {
|
||||||
// MessageId: WSAEINTR, A blocking operation was interrupted by a call to WSACancelBlockingCall.
|
// MessageId: WSAEINTR, A blocking operation was interrupted by a call to WSACancelBlockingCall.
|
||||||
wsaeintr = 10004
|
wsaeintr = 10004
|
||||||
// MessageId: WSAEBADF, The file handle supplied is not valid.
|
// MessageId: WSAEBADF, The file handle supplied is not valid.
|
||||||
wsaebadf = 10009
|
wsaebadf = 10009
|
||||||
// MessageId: WSAEACCES, An attempt was made to access a socket in a way forbidden by its access permissions.
|
// MessageId: WSAEACCES, An attempt was made to access a socket in a way forbidden by its access permissions.
|
||||||
wsaeacces = 10013
|
wsaeacces = 10013
|
||||||
// MessageId: WSAEFAULT, The system detected an invalid pointer address in attempting to use a pointer argument in a call.
|
// MessageId: WSAEFAULT, The system detected an invalid pointer address in attempting to use a pointer argument in a call.
|
||||||
wsaefault = 10014
|
wsaefault = 10014
|
||||||
// MessageId: WSAEINVAL, An invalid argument was supplied.
|
// MessageId: WSAEINVAL, An invalid argument was supplied.
|
||||||
wsaeinval = 10022
|
wsaeinval = 10022
|
||||||
// MessageId: WSAEMFILE, Too many open sockets.
|
// MessageId: WSAEMFILE, Too many open sockets.
|
||||||
wsaemfile = 10024
|
wsaemfile = 10024
|
||||||
// MessageId: WSAEWOULDBLOCK, A non-blocking socket operation could not be completed immediately.
|
// MessageId: WSAEWOULDBLOCK, A non-blocking socket operation could not be completed immediately.
|
||||||
wsaewouldblock = 10035
|
wsaewouldblock = 10035
|
||||||
// MessageId: WSAEINPROGRESS, A blocking operation is currently executing.
|
// MessageId: WSAEINPROGRESS, A blocking operation is currently executing.
|
||||||
wsaeinprogress = 10036
|
wsaeinprogress = 10036
|
||||||
// MessageId: WSAEALREADY, An operation was attempted on a non-blocking socket that already had an operation in progress.
|
// MessageId: WSAEALREADY, An operation was attempted on a non-blocking socket that already had an operation in progress.
|
||||||
wsaealready = 10037
|
wsaealready = 10037
|
||||||
// MessageId: WSAENOTSOCK, An operation was attempted on something that is not a socket.
|
// MessageId: WSAENOTSOCK, An operation was attempted on something that is not a socket.
|
||||||
wsaenotsock = 10038
|
wsaenotsock = 10038
|
||||||
// MessageId: WSAEDESTADDRREQ, A required address was omitted from an operation on a socket.
|
// MessageId: WSAEDESTADDRREQ, A required address was omitted from an operation on a socket.
|
||||||
wsaedestaddrreq = 10039
|
wsaedestaddrreq = 10039
|
||||||
// MessageId: WSAEMSGSIZE, A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
|
// MessageId: WSAEMSGSIZE, A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
|
||||||
wsaemsgsize = 10040
|
wsaemsgsize = 10040
|
||||||
// MessageId: WSAEPROTOTYPE, A protocol was specified in the socket function call that does not support the semantics of the socket type requested.
|
// MessageId: WSAEPROTOTYPE, A protocol was specified in the socket function call that does not support the semantics of the socket type requested.
|
||||||
wsaeprototype = 10041
|
wsaeprototype = 10041
|
||||||
// MessageId: WSAENOPROTOOPT, An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
|
// MessageId: WSAENOPROTOOPT, An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
|
||||||
wsaenoprotoopt = 10042
|
wsaenoprotoopt = 10042
|
||||||
// MessageId: WSAEPROTONOSUPPORT, The requested protocol has not been configured into the system, or no implementation for it exists.
|
// MessageId: WSAEPROTONOSUPPORT, The requested protocol has not been configured into the system, or no implementation for it exists.
|
||||||
wsaeprotonosupport = 10043
|
wsaeprotonosupport = 10043
|
||||||
// MessageId: WSAESOCKTNOSUPPORT, The support for the specified socket type does not exist in this address family.
|
// MessageId: WSAESOCKTNOSUPPORT, The support for the specified socket type does not exist in this address family.
|
||||||
wsaesocktnosupport = 10044
|
wsaesocktnosupport = 10044
|
||||||
// MessageId: WSAEOPNOTSUPP, The attempted operation is not supported for the type of object referenced.
|
// MessageId: WSAEOPNOTSUPP, The attempted operation is not supported for the type of object referenced.
|
||||||
wsaeopnotsupp = 10045
|
wsaeopnotsupp = 10045
|
||||||
// MessageId: WSAEPFNOSUPPORT, The protocol family has not been configured into the system or no implementation for it exists.
|
// MessageId: WSAEPFNOSUPPORT, The protocol family has not been configured into the system or no implementation for it exists.
|
||||||
wsaepfnosupport = 10046
|
wsaepfnosupport = 10046
|
||||||
// MessageId: WSAEAFNOSUPPORT, An address incompatible with the requested protocol was used.
|
// MessageId: WSAEAFNOSUPPORT, An address incompatible with the requested protocol was used.
|
||||||
wsaeafnosupport = 10047
|
wsaeafnosupport = 10047
|
||||||
// MessageId: WSAEADDRINUSE, Only one usage of each socket address (protocol/network address/port) is normally permitted.
|
// MessageId: WSAEADDRINUSE, Only one usage of each socket address (protocol/network address/port) is normally permitted.
|
||||||
wsaeaddrinuse = 10048
|
wsaeaddrinuse = 10048
|
||||||
// MessageId: WSAEADDRNOTAVAIL, The requested address is not valid in its context.
|
// MessageId: WSAEADDRNOTAVAIL, The requested address is not valid in its context.
|
||||||
wsaeaddrnotavail = 10049
|
wsaeaddrnotavail = 10049
|
||||||
// MessageId: WSAENETDOWN, A socket operation encountered a dead network.
|
// MessageId: WSAENETDOWN, A socket operation encountered a dead network.
|
||||||
wsaenetdown = 10050
|
wsaenetdown = 10050
|
||||||
// MessageId: WSAENETUNREACH, A socket operation was attempted to an unreachable network.
|
// MessageId: WSAENETUNREACH, A socket operation was attempted to an unreachable network.
|
||||||
wsaenetunreach = 10051
|
wsaenetunreach = 10051
|
||||||
// MessageId: WSAENETRESET, The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
|
// MessageId: WSAENETRESET, The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
|
||||||
wsaenetreset = 10052
|
wsaenetreset = 10052
|
||||||
// MessageId: WSAECONNABORTED, An established connection was aborted by the software in your host machine.
|
// MessageId: WSAECONNABORTED, An established connection was aborted by the software in your host machine.
|
||||||
wsaeconnaborted = 10053
|
wsaeconnaborted = 10053
|
||||||
// MessageId: WSAECONNRESET, An existing connection was forcibly closed by the remote host.
|
// MessageId: WSAECONNRESET, An existing connection was forcibly closed by the remote host.
|
||||||
wsaeconnreset = 10054
|
wsaeconnreset = 10054
|
||||||
// MessageId: WSAENOBUFS, An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
|
// MessageId: WSAENOBUFS, An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
|
||||||
wsaenobufs = 10055
|
wsaenobufs = 10055
|
||||||
// MessageId: WSAEISCONN, A connect request was made on an already connected socket.
|
// MessageId: WSAEISCONN, A connect request was made on an already connected socket.
|
||||||
wsaeisconn = 10056
|
wsaeisconn = 10056
|
||||||
// MessageId: WSAENOTCONN, A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
|
// MessageId: WSAENOTCONN, A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
|
||||||
wsaenotconn = 10057
|
wsaenotconn = 10057
|
||||||
// MessageId: WSAESHUTDOWN, A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call.
|
// MessageId: WSAESHUTDOWN, A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call.
|
||||||
wsaeshutdown = 10058
|
wsaeshutdown = 10058
|
||||||
// MessageId: WSAETOOMANYREFS, Too many references to some kernel object.
|
// MessageId: WSAETOOMANYREFS, Too many references to some kernel object.
|
||||||
wsaetoomanyrefs = 10059
|
wsaetoomanyrefs = 10059
|
||||||
// MessageId: WSAETIMEDOUT, A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
|
// MessageId: WSAETIMEDOUT, A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
|
||||||
wsaetimedout = 10060
|
wsaetimedout = 10060
|
||||||
// MessageId: WSAECONNREFUSED, No connection could be made because the target machine actively refused it.
|
// MessageId: WSAECONNREFUSED, No connection could be made because the target machine actively refused it.
|
||||||
wsaeconnrefused = 10061
|
wsaeconnrefused = 10061
|
||||||
// MessageId: WSAELOOP, Cannot translate name.
|
// MessageId: WSAELOOP, Cannot translate name.
|
||||||
wsaeloop = 10062
|
wsaeloop = 10062
|
||||||
// MessageId: WSAENAMETOOLONG, Name component or name was too long.
|
// MessageId: WSAENAMETOOLONG, Name component or name was too long.
|
||||||
wsaenametoolong = 10063
|
wsaenametoolong = 10063
|
||||||
// MessageId: WSAEHOSTDOWN, A socket operation failed because the destination host was down.
|
// MessageId: WSAEHOSTDOWN, A socket operation failed because the destination host was down.
|
||||||
wsaehostdown = 10064
|
wsaehostdown = 10064
|
||||||
// MessageId: WSAEHOSTUNREACH, A socket operation was attempted to an unreachable host.
|
// MessageId: WSAEHOSTUNREACH, A socket operation was attempted to an unreachable host.
|
||||||
wsaehostunreach = 10065
|
wsaehostunreach = 10065
|
||||||
// MessageId: WSAENOTEMPTY, Cannot remove a directory that is not empty.
|
// MessageId: WSAENOTEMPTY, Cannot remove a directory that is not empty.
|
||||||
wsaenotempty = 10066
|
wsaenotempty = 10066
|
||||||
// MessageId: WSAEPROCLIM, A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously.
|
// MessageId: WSAEPROCLIM, A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously.
|
||||||
wsaeproclim = 10067
|
wsaeproclim = 10067
|
||||||
// MessageId: WSAEUSERS, Ran out of quota.
|
// MessageId: WSAEUSERS, Ran out of quota.
|
||||||
wsaeusers = 10068
|
wsaeusers = 10068
|
||||||
// MessageId: WSAEDQUOT, Ran out of disk quota.
|
// MessageId: WSAEDQUOT, Ran out of disk quota.
|
||||||
wsaedquot = 10069
|
wsaedquot = 10069
|
||||||
// MessageId: WSAESTALE, File handle reference is no longer available.
|
// MessageId: WSAESTALE, File handle reference is no longer available.
|
||||||
wsaestale = 10070
|
wsaestale = 10070
|
||||||
// MessageId: WSAEREMOTE, Item is not available locally.
|
// MessageId: WSAEREMOTE, Item is not available locally.
|
||||||
wsaeremote = 10071
|
wsaeremote = 10071
|
||||||
// MessageId: WSASYSNOTREADY, WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable.
|
// MessageId: WSASYSNOTREADY, WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable.
|
||||||
wsasysnotready = 10091
|
wsasysnotready = 10091
|
||||||
// MessageId: WSAVERNOTSUPPORTED, The Windows Sockets version requested is not supported.
|
// MessageId: WSAVERNOTSUPPORTED, The Windows Sockets version requested is not supported.
|
||||||
wsavernotsupported = 10092
|
wsavernotsupported = 10092
|
||||||
// MessageId: WSANOTINITIALISED, Either the application has not called WSAStartup, or WSAStartup failed.
|
// MessageId: WSANOTINITIALISED, Either the application has not called WSAStartup, or WSAStartup failed.
|
||||||
wsanotinitialised = 10093
|
wsanotinitialised = 10093
|
||||||
// MessageId: WSAEDISCON, Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.
|
// MessageId: WSAEDISCON, Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.
|
||||||
wsaediscon = 10101
|
wsaediscon = 10101
|
||||||
// MessageId: WSAENOMORE, No more results can be returned by WSALookupServiceNext.
|
// MessageId: WSAENOMORE, No more results can be returned by WSALookupServiceNext.
|
||||||
wsaenomore = 10102
|
wsaenomore = 10102
|
||||||
// MessageId: WSAECANCELLED, A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
|
// MessageId: WSAECANCELLED, A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
|
||||||
wsaecancelled = 10103
|
wsaecancelled = 10103
|
||||||
// MessageId: WSAEINVALIDPROCTABLE, The procedure call table is invalid.
|
// MessageId: WSAEINVALIDPROCTABLE, The procedure call table is invalid.
|
||||||
wsaeinvalidproctable = 10104
|
wsaeinvalidproctable = 10104
|
||||||
// MessageId: WSAEINVALIDPROVIDER, The requested service provider is invalid.
|
// MessageId: WSAEINVALIDPROVIDER, The requested service provider is invalid.
|
||||||
wsaeinvalidprovider = 10105
|
wsaeinvalidprovider = 10105
|
||||||
// MessageId: WSAEPROVIDERFAILEDINIT, The requested service provider could not be loaded or initialized.
|
// MessageId: WSAEPROVIDERFAILEDINIT, The requested service provider could not be loaded or initialized.
|
||||||
wsaeproviderfailedinit = 10106
|
wsaeproviderfailedinit = 10106
|
||||||
// MessageId: WSASYSCALLFAILURE, A system call has failed.
|
// MessageId: WSASYSCALLFAILURE, A system call has failed.
|
||||||
wsasyscallfailure = 10107
|
wsasyscallfailure = 10107
|
||||||
// MessageId: WSASERVICE_NOT_FOUND, No such service is known. The service cannot be found in the specified name space.
|
// MessageId: WSASERVICE_NOT_FOUND, No such service is known. The service cannot be found in the specified name space.
|
||||||
wsaservice_not_found = 10108
|
wsaservice_not_found = 10108
|
||||||
// MessageId: WSATYPE_NOT_FOUND, The specified class was not found.
|
// MessageId: WSATYPE_NOT_FOUND, The specified class was not found.
|
||||||
wsatype_not_found = 10109
|
wsatype_not_found = 10109
|
||||||
// MessageId: WSA_E_NO_MORE, No more results can be returned by WSALookupServiceNext.
|
// MessageId: WSA_E_NO_MORE, No more results can be returned by WSALookupServiceNext.
|
||||||
wsa_e_no_more = 10110
|
wsa_e_no_more = 10110
|
||||||
// MessageId: WSA_E_CANCELLED, A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
|
// MessageId: WSA_E_CANCELLED, A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
|
||||||
wsa_e_cancelled = 10111
|
wsa_e_cancelled = 10111
|
||||||
// MessageId: WSAEREFUSED, A database query failed because it was actively refused.
|
// MessageId: WSAEREFUSED, A database query failed because it was actively refused.
|
||||||
wsaerefused = 10112
|
wsaerefused = 10112
|
||||||
// MessageId: WSAHOST_NOT_FOUND, No such host is known.
|
// MessageId: WSAHOST_NOT_FOUND, No such host is known.
|
||||||
wsahost_not_found = 11001
|
wsahost_not_found = 11001
|
||||||
// MessageId: WSATRY_AGAIN, This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
|
// MessageId: WSATRY_AGAIN, This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
|
||||||
wsatry_again = 11002
|
wsatry_again = 11002
|
||||||
// MessageId: WSANO_RECOVERY, A non-recoverable error occurred during a database lookup.
|
// MessageId: WSANO_RECOVERY, A non-recoverable error occurred during a database lookup.
|
||||||
wsano_recovery = 11003
|
wsano_recovery = 11003
|
||||||
// MessageId: WSANO_DATA, The requested name is valid, but no data of the requested type was found.
|
// MessageId: WSANO_DATA, The requested name is valid, but no data of the requested type was found.
|
||||||
wsano_data = 11004
|
wsano_data = 11004
|
||||||
// MessageId: WSA_QOS_RECEIVERS, At least one reserve has arrived.
|
// MessageId: WSA_QOS_RECEIVERS, At least one reserve has arrived.
|
||||||
wsa_qos_receivers = 11005
|
wsa_qos_receivers = 11005
|
||||||
// MessageId: WSA_QOS_SENDERS, At least one path has arrived.
|
// MessageId: WSA_QOS_SENDERS, At least one path has arrived.
|
||||||
wsa_qos_senders = 11006
|
wsa_qos_senders = 11006
|
||||||
// MessageId: WSA_QOS_NO_SENDERS, There are no senders.
|
// MessageId: WSA_QOS_NO_SENDERS, There are no senders.
|
||||||
wsa_qos_no_senders = 11007
|
wsa_qos_no_senders = 11007
|
||||||
// MessageId: WSA_QOS_NO_RECEIVERS, There are no receivers.
|
// MessageId: WSA_QOS_NO_RECEIVERS, There are no receivers.
|
||||||
wsa_qos_no_receivers = 11008
|
wsa_qos_no_receivers = 11008
|
||||||
// MessageId: WSA_QOS_REQUEST_CONFIRMED, Reserve has been confirmed.
|
// MessageId: WSA_QOS_REQUEST_CONFIRMED, Reserve has been confirmed.
|
||||||
wsa_qos_request_confirmed = 11009
|
wsa_qos_request_confirmed = 11009
|
||||||
// MessageId: WSA_QOS_ADMISSION_FAILURE, Error due to lack of resources.
|
// MessageId: WSA_QOS_ADMISSION_FAILURE, Error due to lack of resources.
|
||||||
wsa_qos_admission_failure = 11010
|
wsa_qos_admission_failure = 11010
|
||||||
// MessageId: WSA_QOS_POLICY_FAILURE, Rejected for administrative reasons - bad credentials.
|
// MessageId: WSA_QOS_POLICY_FAILURE, Rejected for administrative reasons - bad credentials.
|
||||||
wsa_qos_policy_failure = 11011
|
wsa_qos_policy_failure = 11011
|
||||||
// MessageId: WSA_QOS_BAD_STYLE, Unknown or conflicting style.
|
// MessageId: WSA_QOS_BAD_STYLE, Unknown or conflicting style.
|
||||||
wsa_qos_bad_style = 11012
|
wsa_qos_bad_style = 11012
|
||||||
// MessageId: WSA_QOS_BAD_OBJECT, Problem with some part of the filterspec or providerspecific buffer in general.
|
// MessageId: WSA_QOS_BAD_OBJECT, Problem with some part of the filterspec or providerspecific buffer in general.
|
||||||
wsa_qos_bad_object = 11013
|
wsa_qos_bad_object = 11013
|
||||||
// MessageId: WSA_QOS_TRAFFIC_CTRL_ERROR, Problem with some part of the flowspec.
|
// MessageId: WSA_QOS_TRAFFIC_CTRL_ERROR, Problem with some part of the flowspec.
|
||||||
wsa_qos_traffic_ctrl_error = 11014
|
wsa_qos_traffic_ctrl_error = 11014
|
||||||
// MessageId: WSA_QOS_GENERIC_ERROR, General QOS error.
|
// MessageId: WSA_QOS_GENERIC_ERROR, General QOS error.
|
||||||
wsa_qos_generic_error = 11015
|
wsa_qos_generic_error = 11015
|
||||||
// MessageId: WSA_QOS_ESERVICETYPE, An invalid or unrecognized service type was found in the flowspec.
|
// MessageId: WSA_QOS_ESERVICETYPE, An invalid or unrecognized service type was found in the flowspec.
|
||||||
wsa_qos_eservicetype = 11016
|
wsa_qos_eservicetype = 11016
|
||||||
// MessageId: WSA_QOS_EFLOWSPEC, An invalid or inconsistent flowspec was found in the QOS structure.
|
// MessageId: WSA_QOS_EFLOWSPEC, An invalid or inconsistent flowspec was found in the QOS structure.
|
||||||
wsa_qos_eflowspec = 11017
|
wsa_qos_eflowspec = 11017
|
||||||
// MessageId: WSA_QOS_EPROVSPECBUF, Invalid QOS provider-specific buffer.
|
// MessageId: WSA_QOS_EPROVSPECBUF, Invalid QOS provider-specific buffer.
|
||||||
wsa_qos_eprovspecbuf = 11018
|
wsa_qos_eprovspecbuf = 11018
|
||||||
// MessageId: WSA_QOS_EFILTERSTYLE, An invalid QOS filter style was used.
|
// MessageId: WSA_QOS_EFILTERSTYLE, An invalid QOS filter style was used.
|
||||||
wsa_qos_efilterstyle = 11019
|
wsa_qos_efilterstyle = 11019
|
||||||
// MessageId: WSA_QOS_EFILTERTYPE, An invalid QOS filter type was used.
|
// MessageId: WSA_QOS_EFILTERTYPE, An invalid QOS filter type was used.
|
||||||
wsa_qos_efiltertype = 11020
|
wsa_qos_efiltertype = 11020
|
||||||
// MessageId: WSA_QOS_EFILTERCOUNT, An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR.
|
// MessageId: WSA_QOS_EFILTERCOUNT, An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR.
|
||||||
wsa_qos_efiltercount = 11021
|
wsa_qos_efiltercount = 11021
|
||||||
// MessageId: WSA_QOS_EOBJLENGTH, An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer.
|
// MessageId: WSA_QOS_EOBJLENGTH, An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer.
|
||||||
wsa_qos_eobjlength = 11022
|
wsa_qos_eobjlength = 11022
|
||||||
// MessageId: WSA_QOS_EFLOWCOUNT, An incorrect number of flow descriptors was specified in the QOS structure.
|
// MessageId: WSA_QOS_EFLOWCOUNT, An incorrect number of flow descriptors was specified in the QOS structure.
|
||||||
wsa_qos_eflowcount = 11023
|
wsa_qos_eflowcount = 11023
|
||||||
// MessageId: WSA_QOS_EUNKOWNPSOBJ, An unrecognized object was found in the QOS provider-specific buffer.
|
// MessageId: WSA_QOS_EUNKOWNPSOBJ, An unrecognized object was found in the QOS provider-specific buffer.
|
||||||
wsa_qos_eunkownpsobj = 11024
|
wsa_qos_eunkownpsobj = 11024
|
||||||
// MessageId: WSA_QOS_EPOLICYOBJ, An invalid policy object was found in the QOS provider-specific buffer.
|
// MessageId: WSA_QOS_EPOLICYOBJ, An invalid policy object was found in the QOS provider-specific buffer.
|
||||||
wsa_qos_epolicyobj = 11025
|
wsa_qos_epolicyobj = 11025
|
||||||
// MessageId: WSA_QOS_EFLOWDESC, An invalid QOS flow descriptor was found in the flow descriptor list.
|
// MessageId: WSA_QOS_EFLOWDESC, An invalid QOS flow descriptor was found in the flow descriptor list.
|
||||||
wsa_qos_eflowdesc = 11026
|
wsa_qos_eflowdesc = 11026
|
||||||
// MessageId: WSA_QOS_EPSFLOWSPEC, An invalid or inconsistent flowspec was found in the QOS provider specific buffer.
|
// MessageId: WSA_QOS_EPSFLOWSPEC, An invalid or inconsistent flowspec was found in the QOS provider specific buffer.
|
||||||
wsa_qos_epsflowspec = 11027
|
wsa_qos_epsflowspec = 11027
|
||||||
// MessageId: WSA_QOS_EPSFILTERSPEC, An invalid FILTERSPEC was found in the QOS provider-specific buffer.
|
// MessageId: WSA_QOS_EPSFILTERSPEC, An invalid FILTERSPEC was found in the QOS provider-specific buffer.
|
||||||
wsa_qos_epsfilterspec = 11028
|
wsa_qos_epsfilterspec = 11028
|
||||||
// MessageId: WSA_QOS_ESDMODEOBJ, An invalid shape discard mode object was found in the QOS provider specific buffer.
|
// MessageId: WSA_QOS_ESDMODEOBJ, An invalid shape discard mode object was found in the QOS provider specific buffer.
|
||||||
wsa_qos_esdmodeobj = 11029
|
wsa_qos_esdmodeobj = 11029
|
||||||
// MessageId: WSA_QOS_ESHAPERATEOBJ, An invalid shaping rate object was found in the QOS provider-specific buffer.
|
// MessageId: WSA_QOS_ESHAPERATEOBJ, An invalid shaping rate object was found in the QOS provider-specific buffer.
|
||||||
wsa_qos_eshaperateobj = 11030
|
wsa_qos_eshaperateobj = 11030
|
||||||
// MessageId: WSA_QOS_RESERVED_PETYPE, A reserved policy element was found in the QOS provider-specific buffer.
|
// MessageId: WSA_QOS_RESERVED_PETYPE, A reserved policy element was found in the QOS provider-specific buffer.
|
||||||
wsa_qos_reserved_petype = 11031
|
wsa_qos_reserved_petype = 11031
|
||||||
// MessageId: WSA_SECURE_HOST_NOT_FOUND, No such host is known securely.
|
// MessageId: WSA_SECURE_HOST_NOT_FOUND, No such host is known securely.
|
||||||
wsa_secure_host_not_found = 11032
|
wsa_secure_host_not_found = 11032
|
||||||
// MessageId: WSA_IPSEC_NAME_POLICY_ERROR, Name based IPSEC policy could not be added.
|
// MessageId: WSA_IPSEC_NAME_POLICY_ERROR, Name based IPSEC policy could not be added.
|
||||||
wsa_ipsec_name_policy_error = 11033
|
wsa_ipsec_name_policy_error = 11033
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,15 +56,15 @@ pub type Primitive = InfixType
|
||||||
pub struct Null {}
|
pub struct Null {}
|
||||||
|
|
||||||
pub enum OperationKind {
|
pub enum OperationKind {
|
||||||
neq // !=
|
neq // !=
|
||||||
eq // ==
|
eq // ==
|
||||||
gt // >
|
gt // >
|
||||||
lt // <
|
lt // <
|
||||||
ge // >=
|
ge // >=
|
||||||
le // <=
|
le // <=
|
||||||
orm_like // LIKE
|
orm_like // LIKE
|
||||||
orm_ilike // ILIKE
|
orm_ilike // ILIKE
|
||||||
is_null // IS NULL
|
is_null // IS NULL
|
||||||
is_not_null // IS NOT NULL
|
is_not_null // IS NOT NULL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ module os
|
||||||
#include <android/native_activity.h>
|
#include <android/native_activity.h>
|
||||||
|
|
||||||
pub enum AssetMode {
|
pub enum AssetMode {
|
||||||
buffer = C.AASSET_MODE_BUFFER // Caller plans to ask for a read-only buffer with all data.
|
buffer = C.AASSET_MODE_BUFFER // Caller plans to ask for a read-only buffer with all data.
|
||||||
random = C.AASSET_MODE_RANDOM // Read chunks, and seek forward and backward.
|
random = C.AASSET_MODE_RANDOM // Read chunks, and seek forward and backward.
|
||||||
streaming = C.AASSET_MODE_STREAMING // Read sequentially, with an occasional forward seek.
|
streaming = C.AASSET_MODE_STREAMING // Read sequentially, with an occasional forward seek.
|
||||||
unknown = C.AASSET_MODE_UNKNOWN // No specific information about how data will be accessed.
|
unknown = C.AASSET_MODE_UNKNOWN // No specific information about how data will be accessed.
|
||||||
}
|
}
|
||||||
|
|
||||||
// See https://developer.android.com/ndk/reference/struct/a-native-activity for more info.
|
// See https://developer.android.com/ndk/reference/struct/a-native-activity for more info.
|
||||||
|
|
|
@ -877,11 +877,11 @@ fn (re RE) parse_quantifier(in_txt string, in_i int) (int, int, int, bool) {
|
||||||
//
|
//
|
||||||
enum Group_parse_state {
|
enum Group_parse_state {
|
||||||
start
|
start
|
||||||
q_mark // (?
|
q_mark // (?
|
||||||
q_mark1 // (?:|P checking
|
q_mark1 // (?:|P checking
|
||||||
p_status // (?P
|
p_status // (?P
|
||||||
p_start // (?P<
|
p_start // (?P<
|
||||||
p_end // (?P<...>
|
p_end // (?P<...>
|
||||||
p_in_name // (?P<...
|
p_in_name // (?P<...
|
||||||
finish
|
finish
|
||||||
}
|
}
|
||||||
|
@ -1775,15 +1775,15 @@ fn (mut re RE) group_continuous_save(g_index int) {
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
enum Match_state {
|
enum Match_state {
|
||||||
start = 0
|
start = 0
|
||||||
stop
|
stop
|
||||||
end
|
end
|
||||||
new_line
|
new_line
|
||||||
ist_load // load and execute instruction
|
ist_load // load and execute instruction
|
||||||
ist_next // go to next instruction
|
ist_next // go to next instruction
|
||||||
ist_next_ks // go to next instruction without clenaning the state
|
ist_next_ks // go to next instruction without clenaning the state
|
||||||
ist_quant_p // match positive ,quantifier check
|
ist_quant_p // match positive ,quantifier check
|
||||||
ist_quant_n // match negative, quantifier check
|
ist_quant_n // match negative, quantifier check
|
||||||
ist_quant_pg // match positive ,group quantifier check
|
ist_quant_pg // match positive ,group quantifier check
|
||||||
ist_quant_ng // match negative ,group quantifier check
|
ist_quant_ng // match negative ,group quantifier check
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,8 +79,8 @@ pub enum PixelFormat as u32 {
|
||||||
bc6h_rgbuf
|
bc6h_rgbuf
|
||||||
bc7_rgba
|
bc7_rgba
|
||||||
bc7_srgba
|
bc7_srgba
|
||||||
pvrtc_rgb_2bpp // deprecated
|
pvrtc_rgb_2bpp // deprecated
|
||||||
pvrtc_rgb_4bpp // deprecated
|
pvrtc_rgb_4bpp // deprecated
|
||||||
pvrtc_rgba_2bpp // deprecated
|
pvrtc_rgba_2bpp // deprecated
|
||||||
pvrtc_rgba_4bpp // deprecated
|
pvrtc_rgba_4bpp // deprecated
|
||||||
etc2_rgb8
|
etc2_rgb8
|
||||||
|
@ -96,7 +96,7 @@ pub enum PixelFormat as u32 {
|
||||||
astc_4x4_srgba
|
astc_4x4_srgba
|
||||||
//
|
//
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum ResourceState as u32 {
|
pub enum ResourceState as u32 {
|
||||||
|
@ -123,7 +123,7 @@ pub enum BufferType as u32 {
|
||||||
indexbuffer
|
indexbuffer
|
||||||
storagebuffer
|
storagebuffer
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum IndexType as u32 {
|
pub enum IndexType as u32 {
|
||||||
|
@ -153,7 +153,7 @@ pub enum ImageSampleType as u32 {
|
||||||
uint
|
uint
|
||||||
unfilterable_float
|
unfilterable_float
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum SamplerType as u32 {
|
pub enum SamplerType as u32 {
|
||||||
|
@ -162,7 +162,7 @@ pub enum SamplerType as u32 {
|
||||||
nonfiltering
|
nonfiltering
|
||||||
comparison
|
comparison
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum CubeFace as u32 {
|
pub enum CubeFace as u32 {
|
||||||
|
@ -190,7 +190,7 @@ pub enum PrimitiveType as u32 {
|
||||||
triangles
|
triangles
|
||||||
triangle_strip
|
triangle_strip
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum Filter as u32 {
|
pub enum Filter as u32 {
|
||||||
|
@ -204,12 +204,12 @@ pub enum Filter as u32 {
|
||||||
|
|
||||||
pub enum Wrap as u32 {
|
pub enum Wrap as u32 {
|
||||||
_default // value 0 reserved for default-init
|
_default // value 0 reserved for default-init
|
||||||
repeat // The default wrap mode.
|
repeat // The default wrap mode.
|
||||||
clamp_to_edge
|
clamp_to_edge
|
||||||
clamp_to_border // not supported on all backends and platforms. To check for support, call sg_query_features(), and check the "clamp_to_border" boolean in the returned sg_features struct. Platforms which don't support SG_WRAP_CLAMP_TO_BORDER will silently fall back to clamp_to_edge without a validation error.
|
clamp_to_border // not supported on all backends and platforms. To check for support, call sg_query_features(), and check the "clamp_to_border" boolean in the returned sg_features struct. Platforms which don't support SG_WRAP_CLAMP_TO_BORDER will silently fall back to clamp_to_edge without a validation error.
|
||||||
mirrored_repeat
|
mirrored_repeat
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum BorderColor as u32 {
|
pub enum BorderColor as u32 {
|
||||||
|
@ -218,7 +218,7 @@ pub enum BorderColor as u32 {
|
||||||
opaque_black
|
opaque_black
|
||||||
opaque_white
|
opaque_white
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum VertexFormat as u32 {
|
pub enum VertexFormat as u32 {
|
||||||
|
@ -249,7 +249,7 @@ pub enum VertexStep as u32 {
|
||||||
per_vertex
|
per_vertex
|
||||||
per_instance
|
per_instance
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum UniformType as u32 {
|
pub enum UniformType as u32 {
|
||||||
|
@ -296,7 +296,7 @@ pub enum CompareFunc as u32 {
|
||||||
greater_equal
|
greater_equal
|
||||||
always
|
always
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum StencilOp as u32 {
|
pub enum StencilOp as u32 {
|
||||||
|
@ -331,7 +331,7 @@ pub enum BlendFactor as u32 {
|
||||||
blend_alpha
|
blend_alpha
|
||||||
one_minus_blend_alpha
|
one_minus_blend_alpha
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum BlendOp as u32 {
|
pub enum BlendOp as u32 {
|
||||||
|
@ -340,11 +340,11 @@ pub enum BlendOp as u32 {
|
||||||
subtract
|
subtract
|
||||||
reverse_subtract
|
reverse_subtract
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum ColorMask as u32 {
|
pub enum ColorMask as u32 {
|
||||||
_default = 0 // value 0 reserved for default-init
|
_default = 0 // value 0 reserved for default-init
|
||||||
@none = 0x10 // special value for 'all channels disabled
|
@none = 0x10 // special value for 'all channels disabled
|
||||||
r = 1
|
r = 1
|
||||||
g = 2
|
g = 2
|
||||||
|
@ -380,9 +380,9 @@ pub enum StoreAction as u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum UniformLayout as u32 {
|
pub enum UniformLayout as u32 {
|
||||||
uniformlayout_default = 0 // value 0 reserved for default-init
|
uniformlayout_default = 0 // value 0 reserved for default-init
|
||||||
uniformlayout_native // default: layout depends on currently active backend
|
uniformlayout_native // default: layout depends on currently active backend
|
||||||
uniformlayout_std140 // std140: memory layout according to std140
|
uniformlayout_std140 // std140: memory layout according to std140
|
||||||
_num
|
_num
|
||||||
_force_u32 = 0x7FFFFFFF
|
_force_u32 = 0x7FFFFFFF
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,10 +106,10 @@ pub enum KeyCode {
|
||||||
x = 88
|
x = 88
|
||||||
y = 89
|
y = 89
|
||||||
z = 90
|
z = 90
|
||||||
left_bracket = 91 //[
|
left_bracket = 91 //[
|
||||||
backslash = 92 //\
|
backslash = 92 //\
|
||||||
right_bracket = 93 //]
|
right_bracket = 93 //]
|
||||||
grave_accent = 96 //`
|
grave_accent = 96 //`
|
||||||
world_1 = 161 // non-us #1
|
world_1 = 161 // non-us #1
|
||||||
world_2 = 162 // non-us #2
|
world_2 = 162 // non-us #2
|
||||||
escape = 256
|
escape = 256
|
||||||
|
|
|
@ -108,11 +108,11 @@ fn is_exp(x u8) bool {
|
||||||
|
|
||||||
// Possible parser return values.
|
// Possible parser return values.
|
||||||
enum ParserState {
|
enum ParserState {
|
||||||
ok // parser finished OK
|
ok // parser finished OK
|
||||||
pzero // no digits or number is smaller than +-2^-1022
|
pzero // no digits or number is smaller than +-2^-1022
|
||||||
mzero // number is negative, module smaller
|
mzero // number is negative, module smaller
|
||||||
pinf // number is higher than +HUGE_VAL
|
pinf // number is higher than +HUGE_VAL
|
||||||
minf // number is lower than -HUGE_VAL
|
minf // number is lower than -HUGE_VAL
|
||||||
invalid_number // invalid number, used for '#@%^' for example
|
invalid_number // invalid number, used for '#@%^' for example
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ This file contains the printf/sprintf functions
|
||||||
import strings
|
import strings
|
||||||
|
|
||||||
pub enum Align_text {
|
pub enum Align_text {
|
||||||
right = 0
|
right = 0
|
||||||
left
|
left
|
||||||
center
|
center
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ const spinloops = 750
|
||||||
const spinloops_sem = 4000
|
const spinloops_sem = 4000
|
||||||
|
|
||||||
enum BufferElemStat {
|
enum BufferElemStat {
|
||||||
unused = 0
|
unused = 0
|
||||||
writing
|
writing
|
||||||
written
|
written
|
||||||
reading
|
reading
|
||||||
|
|
|
@ -18,26 +18,26 @@ pub:
|
||||||
pub enum Kind {
|
pub enum Kind {
|
||||||
unknown
|
unknown
|
||||||
eof
|
eof
|
||||||
bare // user
|
bare // user
|
||||||
boolean // true or false
|
boolean // true or false
|
||||||
number // 123
|
number // 123
|
||||||
quoted // 'foo', "foo", """foo""" or '''foo'''
|
quoted // 'foo', "foo", """foo""" or '''foo'''
|
||||||
plus // +
|
plus // +
|
||||||
minus // -
|
minus // -
|
||||||
underscore // _
|
underscore // _
|
||||||
comma // ,
|
comma // ,
|
||||||
colon // :
|
colon // :
|
||||||
hash // # comment
|
hash // # comment
|
||||||
assign // =
|
assign // =
|
||||||
lcbr // {
|
lcbr // {
|
||||||
rcbr // }
|
rcbr // }
|
||||||
lsbr // [
|
lsbr // [
|
||||||
rsbr // ]
|
rsbr // ]
|
||||||
nl // \n linefeed / newline character
|
nl // \n linefeed / newline character
|
||||||
cr // \r carriage return
|
cr // \r carriage return
|
||||||
tab // \t character
|
tab // \t character
|
||||||
whitespace // ` `
|
whitespace // ` `
|
||||||
period // .
|
period // .
|
||||||
_end_
|
_end_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -824,13 +824,13 @@ pub mut:
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum ComptimeVarKind {
|
pub enum ComptimeVarKind {
|
||||||
no_comptime // it is not a comptime var
|
no_comptime // it is not a comptime var
|
||||||
key_var // map key from `for k,v in t.$(field.name)`
|
key_var // map key from `for k,v in t.$(field.name)`
|
||||||
value_var // map value from `for k,v in t.$(field.name)`
|
value_var // map value from `for k,v in t.$(field.name)`
|
||||||
field_var // comptime field var `a := t.$(field.name)`
|
field_var // comptime field var `a := t.$(field.name)`
|
||||||
generic_param // generic fn parameter
|
generic_param // generic fn parameter
|
||||||
generic_var // generic var
|
generic_var // generic var
|
||||||
smartcast // smart cast when used in `is v` (when `v` is from $for .variants)
|
smartcast // smart cast when used in `is v` (when `v` is from $for .variants)
|
||||||
}
|
}
|
||||||
|
|
||||||
@[minify]
|
@[minify]
|
||||||
|
@ -1644,13 +1644,13 @@ pub mut:
|
||||||
// addressing modes:
|
// addressing modes:
|
||||||
pub enum AddressingMode {
|
pub enum AddressingMode {
|
||||||
invalid
|
invalid
|
||||||
displacement // displacement
|
displacement // displacement
|
||||||
base // base
|
base // base
|
||||||
base_plus_displacement // base + displacement
|
base_plus_displacement // base + displacement
|
||||||
index_times_scale_plus_displacement // (index ∗ scale) + displacement
|
index_times_scale_plus_displacement // (index ∗ scale) + displacement
|
||||||
base_plus_index_plus_displacement // base + (index ∗ scale) + displacement
|
base_plus_index_plus_displacement // base + (index ∗ scale) + displacement
|
||||||
base_plus_index_times_scale_plus_displacement // base + index + displacement
|
base_plus_index_times_scale_plus_displacement // base + index + displacement
|
||||||
rip_plus_displacement // rip + displacement
|
rip_plus_displacement // rip + displacement
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct AsmClobbered {
|
pub struct AsmClobbered {
|
||||||
|
|
|
@ -6,10 +6,10 @@ module ast
|
||||||
import v.token
|
import v.token
|
||||||
|
|
||||||
pub enum AttrKind {
|
pub enum AttrKind {
|
||||||
plain // [name]
|
plain // [name]
|
||||||
string // ['name']
|
string // ['name']
|
||||||
number // [123]
|
number // [123]
|
||||||
bool // [true] || [false]
|
bool // [true] || [false]
|
||||||
comptime_define // [if name]
|
comptime_define // [if name]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ pub enum Language {
|
||||||
i386
|
i386
|
||||||
arm64 // 64-bit arm
|
arm64 // 64-bit arm
|
||||||
arm32 // 32-bit arm
|
arm32 // 32-bit arm
|
||||||
rv64 // 64-bit risc-v
|
rv64 // 64-bit risc-v
|
||||||
rv32 // 32-bit risc-v
|
rv32 // 32-bit risc-v
|
||||||
wasm32
|
wasm32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -926,12 +926,6 @@ pub fn (mut f Fmt) comptime_for(node ast.ComptimeFor) {
|
||||||
f.writeln('}')
|
f.writeln('}')
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ValAlignInfo {
|
|
||||||
mut:
|
|
||||||
max int
|
|
||||||
last_idx int
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn (mut f Fmt) const_decl(node ast.ConstDecl) {
|
pub fn (mut f Fmt) const_decl(node ast.ConstDecl) {
|
||||||
if node.fields.len == 0 && node.pos.line_nr == node.pos.last_line {
|
if node.fields.len == 0 && node.pos.line_nr == node.pos.last_line {
|
||||||
// remove "const()"
|
// remove "const()"
|
||||||
|
@ -1044,37 +1038,74 @@ pub fn (mut f Fmt) enum_decl(node ast.EnumDecl) {
|
||||||
}
|
}
|
||||||
f.writeln('enum ${name} {')
|
f.writeln('enum ${name} {')
|
||||||
f.comments(node.comments, same_line: true, level: .indent)
|
f.comments(node.comments, same_line: true, level: .indent)
|
||||||
mut align_infos := []ValAlignInfo{}
|
|
||||||
mut info := ValAlignInfo{}
|
mut value_aligns := []AlignInfo{}
|
||||||
for i, field in node.fields {
|
mut attr_aligns := []AlignInfo{}
|
||||||
if field.name.len > info.max {
|
mut comment_aligns := []AlignInfo{}
|
||||||
info.max = field.name.len
|
for field in node.fields {
|
||||||
|
if field.has_expr {
|
||||||
|
value_aligns.add_info(field.name.len, field.pos.line_nr)
|
||||||
}
|
}
|
||||||
if !expr_is_single_line(field.expr) {
|
attrs_len := inline_attrs_len(field.attrs)
|
||||||
info.last_idx = i
|
if field.attrs.len > 0 {
|
||||||
align_infos << info
|
if field.has_expr {
|
||||||
info = ValAlignInfo{}
|
attr_aligns.add_info(field.expr.str().len + 2, field.pos.line_nr)
|
||||||
|
} else {
|
||||||
|
attr_aligns.add_info(field.name.len, field.pos.line_nr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if field.comments.len > 0 {
|
||||||
|
if field.attrs.len > 0 {
|
||||||
|
comment_aligns.add_info(attrs_len, field.pos.line_nr)
|
||||||
|
} else if field.has_expr {
|
||||||
|
comment_aligns.add_info(field.expr.str().len + 2, field.pos.line_nr)
|
||||||
|
} else {
|
||||||
|
comment_aligns.add_info(field.name.len, field.pos.line_nr)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info.last_idx = node.fields.len
|
|
||||||
align_infos << info
|
|
||||||
|
|
||||||
mut align_idx := 0
|
mut value_align_i := 0
|
||||||
for i, field in node.fields {
|
mut attr_align_i := 0
|
||||||
if i > align_infos[align_idx].last_idx {
|
mut comment_align_i := 0
|
||||||
align_idx++
|
for field in node.fields {
|
||||||
}
|
|
||||||
f.write('\t${field.name}')
|
f.write('\t${field.name}')
|
||||||
if field.has_expr {
|
if field.has_expr {
|
||||||
f.write(strings.repeat(` `, align_infos[align_idx].max - field.name.len))
|
if value_aligns[value_align_i].line_nr < field.pos.line_nr {
|
||||||
|
value_align_i++
|
||||||
|
}
|
||||||
|
f.write(strings.repeat(` `, value_aligns[value_align_i].max_len - field.name.len))
|
||||||
f.write(' = ')
|
f.write(' = ')
|
||||||
f.expr(field.expr)
|
f.expr(field.expr)
|
||||||
}
|
}
|
||||||
|
attrs_len := inline_attrs_len(field.attrs)
|
||||||
if field.attrs.len > 0 {
|
if field.attrs.len > 0 {
|
||||||
|
if attr_aligns[attr_align_i].line_nr < field.pos.line_nr {
|
||||||
|
attr_align_i++
|
||||||
|
}
|
||||||
|
if field.has_expr {
|
||||||
|
f.write(strings.repeat(` `, attr_aligns[attr_align_i].max_len - field.expr.str().len - 2))
|
||||||
|
} else {
|
||||||
|
f.write(strings.repeat(` `, attr_aligns[attr_align_i].max_len - field.name.len))
|
||||||
|
}
|
||||||
f.write(' ')
|
f.write(' ')
|
||||||
f.single_line_attrs(field.attrs, same_line: true)
|
f.single_line_attrs(field.attrs, same_line: true)
|
||||||
}
|
}
|
||||||
f.comments(field.comments, same_line: true, has_nl: false, level: .indent)
|
// f.comments(field.comments, same_line: true, has_nl: false, level: .indent)
|
||||||
|
if field.comments.len > 0 {
|
||||||
|
if comment_aligns[comment_align_i].line_nr < field.pos.line_nr {
|
||||||
|
comment_align_i++
|
||||||
|
}
|
||||||
|
if field.attrs.len > 0 {
|
||||||
|
f.write(strings.repeat(` `, comment_aligns[comment_align_i].max_len - attrs_len))
|
||||||
|
} else if field.has_expr {
|
||||||
|
f.write(strings.repeat(` `, comment_aligns[comment_align_i].max_len - field.expr.str().len - 2))
|
||||||
|
} else {
|
||||||
|
f.write(strings.repeat(` `, comment_aligns[comment_align_i].max_len - field.name.len))
|
||||||
|
}
|
||||||
|
f.write(' ')
|
||||||
|
f.comments(field.comments, same_line: true, has_nl: false)
|
||||||
|
}
|
||||||
f.writeln('')
|
f.writeln('')
|
||||||
f.comments(field.next_comments, has_nl: true, level: .indent)
|
f.comments(field.next_comments, has_nl: true, level: .indent)
|
||||||
}
|
}
|
||||||
|
|
11
vlib/v/fmt/tests/enum_attrs_comments_keep.vv
Normal file
11
vlib/v/fmt/tests/enum_attrs_comments_keep.vv
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
enum Color {
|
||||||
|
red @[RED] // first attribute
|
||||||
|
blue @[BLUE] // second attribute
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
$for e in Color.values {
|
||||||
|
println(e.name)
|
||||||
|
println(e.attrs)
|
||||||
|
}
|
||||||
|
}
|
22
vlib/v/fmt/tests/enum_values_comments_keep.vv
Normal file
22
vlib/v/fmt/tests/enum_values_comments_keep.vv
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
pub enum KeyCode {
|
||||||
|
invalid = 0
|
||||||
|
space = 32
|
||||||
|
apostrophe = 39 //'
|
||||||
|
comma = 44 //,
|
||||||
|
minus = 45 //-
|
||||||
|
period = 46 //.
|
||||||
|
slash = 47 ///
|
||||||
|
semicolon = 59 //;
|
||||||
|
equal = 61 //=
|
||||||
|
left_bracket = 91 //[
|
||||||
|
backslash = 92 //\
|
||||||
|
right_bracket = 93 //]
|
||||||
|
grave_accent = 96 //`
|
||||||
|
world_1 = 161 // non-us #1
|
||||||
|
world_2 = 162 // non-us #2
|
||||||
|
escape = 256
|
||||||
|
enter = 257
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
}
|
|
@ -6,16 +6,16 @@ module native
|
||||||
import v.ast
|
import v.ast
|
||||||
|
|
||||||
enum Arm64Register {
|
enum Arm64Register {
|
||||||
x0 // v----
|
x0 // v----
|
||||||
x1 // |
|
x1 // |
|
||||||
x2 // |
|
x2 // |
|
||||||
x3 // | parameter and result registers
|
x3 // | parameter and result registers
|
||||||
x4 // |
|
x4 // |
|
||||||
x5 // |
|
x5 // |
|
||||||
x6 // |
|
x6 // |
|
||||||
x7 // ^----
|
x7 // ^----
|
||||||
x8 // XR - indirect result location register
|
x8 // XR - indirect result location register
|
||||||
x9 // v----
|
x9 // v----
|
||||||
x10 // |
|
x10 // |
|
||||||
x11 // |
|
x11 // |
|
||||||
x12 // | caller saved registers
|
x12 // | caller saved registers
|
||||||
|
|
|
@ -92,7 +92,7 @@ enum PeMagic as u16 {
|
||||||
|
|
||||||
// reference: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format?redirectedfrom=MSDN#windows-subsystem
|
// reference: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format?redirectedfrom=MSDN#windows-subsystem
|
||||||
enum PeSubsystem as u16 {
|
enum PeSubsystem as u16 {
|
||||||
unknown = 0
|
unknown = 0
|
||||||
native
|
native
|
||||||
windows_gui
|
windows_gui
|
||||||
windows_cui
|
windows_cui
|
||||||
|
|
|
@ -14,8 +14,8 @@ enum State {
|
||||||
// for example for interpolating arbitrary source code (even V source) templates.
|
// for example for interpolating arbitrary source code (even V source) templates.
|
||||||
//
|
//
|
||||||
html // default, only when the template extension is .html
|
html // default, only when the template extension is .html
|
||||||
css // <style>
|
css // <style>
|
||||||
js // <script>
|
js // <script>
|
||||||
// span // span.{
|
// span // span.{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ pub enum Arch {
|
||||||
amd64 // aka x86_64
|
amd64 // aka x86_64
|
||||||
arm64 // 64-bit arm
|
arm64 // 64-bit arm
|
||||||
arm32 // 32-bit arm
|
arm32 // 32-bit arm
|
||||||
rv64 // 64-bit risc-v
|
rv64 // 64-bit risc-v
|
||||||
rv32 // 32-bit risc-v
|
rv32 // 32-bit risc-v
|
||||||
i386
|
i386
|
||||||
js_node
|
js_node
|
||||||
js_browser
|
js_browser
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub enum OS {
|
||||||
wasm32_emscripten
|
wasm32_emscripten
|
||||||
wasm32_wasi
|
wasm32_wasi
|
||||||
browser // -b wasm -os browser
|
browser // -b wasm -os browser
|
||||||
wasi // -b wasm -os wasi
|
wasi // -b wasm -os wasi
|
||||||
raw
|
raw
|
||||||
all
|
all
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,11 @@ pub enum AssertFailureMode {
|
||||||
pub enum GarbageCollectionMode {
|
pub enum GarbageCollectionMode {
|
||||||
unknown
|
unknown
|
||||||
no_gc
|
no_gc
|
||||||
boehm_full // full garbage collection mode
|
boehm_full // full garbage collection mode
|
||||||
boehm_incr // incremental garbage collection mode
|
boehm_incr // incremental garbage collection mode
|
||||||
boehm_full_opt // full garbage collection mode
|
boehm_full_opt // full garbage collection mode
|
||||||
boehm_incr_opt // incremental garbage collection mode
|
boehm_incr_opt // incremental garbage collection mode
|
||||||
boehm_leak // leak detection mode (makes `gc_check_leaks()` work)
|
boehm_leak // leak detection mode (makes `gc_check_leaks()` work)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum OutputMode {
|
pub enum OutputMode {
|
||||||
|
@ -46,14 +46,14 @@ pub enum ColorOutput {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum Backend {
|
pub enum Backend {
|
||||||
c // The (default) C backend
|
c // The (default) C backend
|
||||||
golang // Go backend
|
golang // Go backend
|
||||||
interpret // Interpret the ast
|
interpret // Interpret the ast
|
||||||
js_node // The JavaScript NodeJS backend
|
js_node // The JavaScript NodeJS backend
|
||||||
js_browser // The JavaScript browser backend
|
js_browser // The JavaScript browser backend
|
||||||
js_freestanding // The JavaScript freestanding backend
|
js_freestanding // The JavaScript freestanding backend
|
||||||
native // The Native backend
|
native // The Native backend
|
||||||
wasm // The WebAssembly backend
|
wasm // The WebAssembly backend
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (b Backend) is_js() bool {
|
pub fn (b Backend) is_js() bool {
|
||||||
|
|
|
@ -25,8 +25,8 @@ pub enum VLanguage {
|
||||||
i386
|
i386
|
||||||
arm64 // 64-bit arm
|
arm64 // 64-bit arm
|
||||||
arm32 // 32-bit arm
|
arm32 // 32-bit arm
|
||||||
rv64 // 64-bit risc-v
|
rv64 // 64-bit risc-v
|
||||||
rv32 // 32-bit risc-v
|
rv32 // 32-bit risc-v
|
||||||
wasm32
|
wasm32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
enum Foo {
|
enum Foo {
|
||||||
zero
|
zero
|
||||||
first = 1
|
first = 1
|
||||||
third = 3
|
third = 3
|
||||||
fourth
|
fourth
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
enum Color {
|
enum Color {
|
||||||
red = 1 + 1 @[json: 'Red']
|
red = 1 + 1 @[json: 'Red']
|
||||||
blue = 10 / 2 @[json: 'Blue']
|
blue = 10 / 2 @[json: 'Blue']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
enum MyEnum {
|
enum MyEnum {
|
||||||
first = 20
|
first = 20
|
||||||
second
|
second
|
||||||
third
|
third
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ enum Color1 {
|
||||||
enum Color2 as i64 {
|
enum Color2 as i64 {
|
||||||
unknown
|
unknown
|
||||||
red
|
red
|
||||||
blue = 123456789012345
|
blue = 123456789012345
|
||||||
green
|
green
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub fn maybe_map[T, X](a []T, f fn (T) !X) ![]X {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum ApplicationCommandOptionType {
|
pub enum ApplicationCommandOptionType {
|
||||||
sub_command = 1
|
sub_command = 1
|
||||||
sub_command_group
|
sub_command_group
|
||||||
string
|
string
|
||||||
integer
|
integer
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub fn PartialEmoji.parse(j json2.Any) !PartialEmoji {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum ButtonStyle {
|
pub enum ButtonStyle {
|
||||||
primary = 1
|
primary = 1
|
||||||
secondary
|
secondary
|
||||||
success
|
success
|
||||||
danger
|
danger
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module builtin
|
module builtin
|
||||||
|
|
||||||
pub enum BTest_enum {
|
pub enum BTest_enum {
|
||||||
v0 = 0
|
v0 = 0
|
||||||
v1
|
v1
|
||||||
v2
|
v2
|
||||||
v3
|
v3
|
||||||
|
|
|
@ -21,71 +21,71 @@ pub:
|
||||||
pub enum Kind {
|
pub enum Kind {
|
||||||
unknown
|
unknown
|
||||||
eof
|
eof
|
||||||
name // user
|
name // user
|
||||||
number // 123
|
number // 123
|
||||||
string // 'foo'
|
string // 'foo'
|
||||||
str_inter // 'name=$user.name'
|
str_inter // 'name=$user.name'
|
||||||
chartoken // `A` - rune
|
chartoken // `A` - rune
|
||||||
plus // +
|
plus // +
|
||||||
minus // -
|
minus // -
|
||||||
mul // *
|
mul // *
|
||||||
div // /
|
div // /
|
||||||
mod // %
|
mod // %
|
||||||
xor // ^
|
xor // ^
|
||||||
pipe // |
|
pipe // |
|
||||||
inc // ++
|
inc // ++
|
||||||
dec // --
|
dec // --
|
||||||
and // &&
|
and // &&
|
||||||
logical_or // ||
|
logical_or // ||
|
||||||
not // !
|
not // !
|
||||||
bit_not // ~
|
bit_not // ~
|
||||||
question // ?
|
question // ?
|
||||||
comma // ,
|
comma // ,
|
||||||
semicolon // ;
|
semicolon // ;
|
||||||
colon // :
|
colon // :
|
||||||
arrow // <-
|
arrow // <-
|
||||||
amp // &
|
amp // &
|
||||||
hash // #
|
hash // #
|
||||||
dollar // $
|
dollar // $
|
||||||
at // @
|
at // @
|
||||||
str_dollar
|
str_dollar
|
||||||
left_shift // <<
|
left_shift // <<
|
||||||
right_shift // >>
|
right_shift // >>
|
||||||
unsigned_right_shift // >>>
|
unsigned_right_shift // >>>
|
||||||
not_in // !in
|
not_in // !in
|
||||||
not_is // !is
|
not_is // !is
|
||||||
assign // =
|
assign // =
|
||||||
decl_assign // :=
|
decl_assign // :=
|
||||||
plus_assign // +=
|
plus_assign // +=
|
||||||
minus_assign // -=
|
minus_assign // -=
|
||||||
div_assign // /=
|
div_assign // /=
|
||||||
mult_assign // *=
|
mult_assign // *=
|
||||||
xor_assign // ^=
|
xor_assign // ^=
|
||||||
mod_assign // %=
|
mod_assign // %=
|
||||||
or_assign // |=
|
or_assign // |=
|
||||||
and_assign // &=
|
and_assign // &=
|
||||||
right_shift_assign // <<=
|
right_shift_assign // <<=
|
||||||
left_shift_assign // >>=
|
left_shift_assign // >>=
|
||||||
unsigned_right_shift_assign // >>>=
|
unsigned_right_shift_assign // >>>=
|
||||||
boolean_and_assign // &&=
|
boolean_and_assign // &&=
|
||||||
boolean_or_assign // ||=
|
boolean_or_assign // ||=
|
||||||
lcbr // {
|
lcbr // {
|
||||||
rcbr // }
|
rcbr // }
|
||||||
lpar // (
|
lpar // (
|
||||||
rpar // )
|
rpar // )
|
||||||
lsbr // [
|
lsbr // [
|
||||||
nilsbr // #[
|
nilsbr // #[
|
||||||
rsbr // ]
|
rsbr // ]
|
||||||
eq // ==
|
eq // ==
|
||||||
ne // !=
|
ne // !=
|
||||||
gt // >
|
gt // >
|
||||||
lt // <
|
lt // <
|
||||||
ge // >=
|
ge // >=
|
||||||
le // <=
|
le // <=
|
||||||
comment
|
comment
|
||||||
nl
|
nl
|
||||||
dot // .
|
dot // .
|
||||||
dotdot // ..
|
dotdot // ..
|
||||||
ellipsis // ...
|
ellipsis // ...
|
||||||
keyword_beg
|
keyword_beg
|
||||||
key_as
|
key_as
|
||||||
|
@ -414,15 +414,15 @@ pub enum Precedence {
|
||||||
cond // OR or AND
|
cond // OR or AND
|
||||||
in_as
|
in_as
|
||||||
assign // =
|
assign // =
|
||||||
eq // == or !=
|
eq // == or !=
|
||||||
// less_greater // > or <
|
// less_greater // > or <
|
||||||
sum // + - | ^
|
sum // + - | ^
|
||||||
product // * / << >> >>> &
|
product // * / << >> >>> &
|
||||||
// mod // %
|
// mod // %
|
||||||
prefix // -X or !X; TODO: seems unused
|
prefix // -X or !X; TODO: seems unused
|
||||||
postfix // ++ or --
|
postfix // ++ or --
|
||||||
call // func(X) or foo.method(X)
|
call // func(X) or foo.method(X)
|
||||||
index // array[index], map[key]
|
index // array[index], map[key]
|
||||||
highest
|
highest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ import time
|
||||||
|
|
||||||
pub enum DiffTool {
|
pub enum DiffTool {
|
||||||
auto
|
auto
|
||||||
diff // core package on Unix-like systems.
|
diff // core package on Unix-like systems.
|
||||||
colordiff // `diff` wrapper.
|
colordiff // `diff` wrapper.
|
||||||
delta // viewer for git and diff output.
|
delta // viewer for git and diff output.
|
||||||
// fc // built-in tool on windows. // TODO: enable when its command output can be read.
|
// fc // built-in tool on windows. // TODO: enable when its command output can be read.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,32 +4,32 @@
|
||||||
module token
|
module token
|
||||||
|
|
||||||
pub enum Token {
|
pub enum Token {
|
||||||
amp // &
|
amp // &
|
||||||
and // &&
|
and // &&
|
||||||
and_assign // &=
|
and_assign // &=
|
||||||
arrow // <-
|
arrow // <-
|
||||||
assign // =
|
assign // =
|
||||||
// at // @
|
// at // @
|
||||||
attribute
|
attribute
|
||||||
bit_not // ~
|
bit_not // ~
|
||||||
char // `A` - rune
|
char // `A` - rune
|
||||||
colon // :
|
colon // :
|
||||||
comma // ,
|
comma // ,
|
||||||
comment
|
comment
|
||||||
dec // --
|
dec // --
|
||||||
decl_assign // :=
|
decl_assign // :=
|
||||||
div // /
|
div // /
|
||||||
div_assign // /=
|
div_assign // /=
|
||||||
dollar // $
|
dollar // $
|
||||||
dot // .
|
dot // .
|
||||||
dotdot // ..
|
dotdot // ..
|
||||||
ellipsis // ...
|
ellipsis // ...
|
||||||
eof
|
eof
|
||||||
eq // ==
|
eq // ==
|
||||||
ge // >=
|
ge // >=
|
||||||
gt // >
|
gt // >
|
||||||
hash // #
|
hash // #
|
||||||
inc // ++
|
inc // ++
|
||||||
key_as
|
key_as
|
||||||
key_asm
|
key_asm
|
||||||
key_assert
|
key_assert
|
||||||
|
@ -78,43 +78,43 @@ pub enum Token {
|
||||||
key_unlikely
|
key_unlikely
|
||||||
key_unsafe
|
key_unsafe
|
||||||
key_volatile
|
key_volatile
|
||||||
lcbr // {
|
lcbr // {
|
||||||
le // <=
|
le // <=
|
||||||
left_shift // <<
|
left_shift // <<
|
||||||
left_shift_assign // >>=
|
left_shift_assign // >>=
|
||||||
logical_or // ||
|
logical_or // ||
|
||||||
lpar // (
|
lpar // (
|
||||||
lsbr // [
|
lsbr // [
|
||||||
lt // <
|
lt // <
|
||||||
minus // -
|
minus // -
|
||||||
minus_assign // -=
|
minus_assign // -=
|
||||||
mod // %
|
mod // %
|
||||||
mod_assign // %=
|
mod_assign // %=
|
||||||
mul // *
|
mul // *
|
||||||
mul_assign // *=
|
mul_assign // *=
|
||||||
name // user
|
name // user
|
||||||
ne // !=
|
ne // !=
|
||||||
not // !
|
not // !
|
||||||
not_in // !in
|
not_in // !in
|
||||||
not_is // !is
|
not_is // !is
|
||||||
number // 123
|
number // 123
|
||||||
or_assign // |=
|
or_assign // |=
|
||||||
pipe // |
|
pipe // |
|
||||||
plus // +
|
plus // +
|
||||||
plus_assign // +=
|
plus_assign // +=
|
||||||
question // ?
|
question // ?
|
||||||
rcbr // }
|
rcbr // }
|
||||||
right_shift // >>
|
right_shift // >>
|
||||||
right_shift_assign // <<=
|
right_shift_assign // <<=
|
||||||
right_shift_unsigned // >>>
|
right_shift_unsigned // >>>
|
||||||
right_shift_unsigned_assign // >>>=
|
right_shift_unsigned_assign // >>>=
|
||||||
rpar // )
|
rpar // )
|
||||||
rsbr // ]
|
rsbr // ]
|
||||||
semicolon // ;
|
semicolon // ;
|
||||||
str_dollar
|
str_dollar
|
||||||
string // 'foo'
|
string // 'foo'
|
||||||
unknown
|
unknown
|
||||||
xor // ^
|
xor // ^
|
||||||
xor_assign // ^=
|
xor_assign // ^=
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ enum TokenKind {
|
||||||
null
|
null
|
||||||
bool_
|
bool_
|
||||||
eof
|
eof
|
||||||
comma = 44 // ,
|
comma = 44 // ,
|
||||||
colon = 58 // :
|
colon = 58 // :
|
||||||
lsbr = 91 // [
|
lsbr = 91 // [
|
||||||
rsbr = 93 // ]
|
rsbr = 93 // ]
|
||||||
lcbr = 123 // {
|
lcbr = 123 // {
|
||||||
rcbr = 125 // }
|
rcbr = 125 // }
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@ enum State {
|
||||||
// for example for interpolating arbitrary source code (even V source) templates.
|
// for example for interpolating arbitrary source code (even V source) templates.
|
||||||
//
|
//
|
||||||
html // default, only when the template extension is .html
|
html // default, only when the template extension is .html
|
||||||
css // <style>
|
css // <style>
|
||||||
js // <script>
|
js // <script>
|
||||||
// span // span.{
|
// span // span.{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue