mirror of https://github.com/hyper-tuner/ini.git
rusEFI initial support (#141)
This commit is contained in:
parent
b3638a150e
commit
f14d9a661e
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"cSpell.words": [
|
||||
"hypertuner"
|
||||
"hypertuner",
|
||||
"rusefi"
|
||||
]
|
||||
}
|
||||
|
|
14
src/ini.ts
14
src/ini.ts
|
@ -56,7 +56,7 @@ export class INI implements ParserInterface {
|
|||
constructor(buffer: ArrayBuffer) {
|
||||
this.space = P.optWhitespace;
|
||||
this.expression = P.regexp(/{.+?}|(([a-z])([A-Za-z\d]+))/);
|
||||
this.numbers = P.regexp(/[0-9.-]*/);
|
||||
this.numbers = P.regexp(/[0-9.E-]*/);
|
||||
this.name = P.regexp(/[0-9a-z_\\-]*/i);
|
||||
this.equal = P.string('=');
|
||||
this.quote = P.string('"');
|
||||
|
@ -1199,12 +1199,24 @@ export class INI implements ParserInterface {
|
|||
P.all,
|
||||
);
|
||||
|
||||
// predefined constant continuousChannelValue (in pcVariables)
|
||||
// TODO: investigate this
|
||||
const continuousChannelValue = P.seqObj<any>(
|
||||
['name', this.name],
|
||||
this.space, this.equal, this.space,
|
||||
['reference', this.name],
|
||||
...this.delimiter,
|
||||
['channel', this.name],
|
||||
P.all,
|
||||
);
|
||||
|
||||
return scalar
|
||||
.or(scalarShort)
|
||||
.or(array)
|
||||
.or(bits)
|
||||
.or(bitsShort)
|
||||
.or(string)
|
||||
.or(continuousChannelValue)
|
||||
.tryParse(line);
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -15,6 +15,10 @@ const SPEEDUINO_VERSIONS = [
|
|||
'202012',
|
||||
];
|
||||
|
||||
const RUSEFI_VERSIONS = [
|
||||
'rusefi_mre_f4',
|
||||
];
|
||||
|
||||
const pathFor = (ecosystem, file) => path.join(__dirname, `/../test/data/${ecosystem}/${file}`);
|
||||
|
||||
const hashReference = (ecosystem, version) => {
|
||||
|
@ -64,6 +68,7 @@ const runFor = (ecosystem, versions, generateOnly) => {
|
|||
|
||||
const run = (generateOnly) => {
|
||||
runFor('speeduino', SPEEDUINO_VERSIONS, generateOnly);
|
||||
runFor('rusefi', RUSEFI_VERSIONS, generateOnly);
|
||||
};
|
||||
|
||||
run(process.argv[2] === 'generate');
|
||||
|
|
Loading…
Reference in New Issue