@swaggerexpert/arazzo-runtime-expression 1.0.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +156 -76
- package/SECURITY.md +2 -1
- package/cjs/apg-lite.cjs +28 -28
- package/cjs/errors/ArazzoRuntimeExpressionError.cjs +44 -0
- package/cjs/errors/ArazzoRuntimeExpressionParseError.cjs +8 -0
- package/cjs/extract.cjs +35 -9
- package/cjs/{runtime-expression.cjs → grammar.cjs} +828 -286
- package/cjs/index.cjs +17 -5
- package/cjs/parse/callbacks/cst.cjs +28 -0
- package/cjs/parse/index.cjs +31 -32
- package/cjs/parse/trace/Expectations.cjs +10 -0
- package/cjs/parse/trace/Trace.cjs +35 -0
- package/cjs/parse/translators/ASTTranslator/index.cjs +15 -0
- package/cjs/parse/translators/ASTTranslator/transformers.cjs +225 -0
- package/cjs/parse/translators/CSTTranslator.cjs +55 -0
- package/cjs/parse/translators/XMLTranslator.cjs +12 -0
- package/cjs/test/index.cjs +18 -0
- package/es/errors/ArazzoRuntimeExpressionError.mjs +40 -0
- package/es/errors/ArazzoRuntimeExpressionParseError.mjs +3 -0
- package/es/extract.mjs +34 -9
- package/es/{runtime-expression.mjs → grammar.mjs} +828 -286
- package/es/index.mjs +9 -3
- package/es/parse/callbacks/cst.mjs +24 -0
- package/es/parse/index.mjs +31 -32
- package/es/parse/trace/Expectations.mjs +6 -0
- package/es/parse/trace/Trace.mjs +30 -0
- package/es/parse/translators/ASTTranslator/index.mjs +9 -0
- package/es/parse/translators/ASTTranslator/transformers.mjs +219 -0
- package/es/parse/translators/CSTTranslator.mjs +50 -0
- package/es/parse/translators/XMLTranslator.mjs +7 -0
- package/es/test/index.mjs +13 -0
- package/package.json +21 -14
- package/types/index.d.ts +330 -31
- package/cjs/parse/callbacks/body-reference.cjs +0 -14
- package/cjs/parse/callbacks/expression.cjs +0 -15
- package/cjs/parse/callbacks/header-reference.cjs +0 -14
- package/cjs/parse/callbacks/json-pointer.cjs +0 -14
- package/cjs/parse/callbacks/name.cjs +0 -14
- package/cjs/parse/callbacks/parameter-name.cjs +0 -14
- package/cjs/parse/callbacks/path-reference.cjs +0 -14
- package/cjs/parse/callbacks/query-reference.cjs +0 -14
- package/cjs/parse/callbacks/reference-token.cjs +0 -14
- package/cjs/parse/callbacks/source.cjs +0 -14
- package/cjs/parse/callbacks/token.cjs +0 -15
- package/cjs/test.cjs +0 -15
- package/es/parse/callbacks/body-reference.mjs +0 -10
- package/es/parse/callbacks/expression.mjs +0 -11
- package/es/parse/callbacks/header-reference.mjs +0 -10
- package/es/parse/callbacks/json-pointer.mjs +0 -10
- package/es/parse/callbacks/name.mjs +0 -10
- package/es/parse/callbacks/parameter-name.mjs +0 -10
- package/es/parse/callbacks/path-reference.mjs +0 -10
- package/es/parse/callbacks/query-reference.mjs +0 -10
- package/es/parse/callbacks/reference-token.mjs +0 -10
- package/es/parse/callbacks/source.mjs +0 -10
- package/es/parse/callbacks/token.mjs +0 -10
- package/es/test.mjs +0 -10
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { identifiers, utilities } from 'apg-lite';
|
|
2
|
-
const source = (state, chars, phraseIndex, phraseLength, data) => {
|
|
3
|
-
if (state === identifiers.SEM_PRE) {
|
|
4
|
-
data.push(['source', utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
5
|
-
} else if (state === identifiers.SEM_POST) {
|
|
6
|
-
/* not used in this example */
|
|
7
|
-
}
|
|
8
|
-
return identifiers.SEM_OK;
|
|
9
|
-
};
|
|
10
|
-
export default source;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { identifiers, utilities } from 'apg-lite';
|
|
2
|
-
export const token = (state, chars, phraseIndex, phraseLength, data) => {
|
|
3
|
-
if (state === identifiers.SEM_PRE) {
|
|
4
|
-
data.push(['token', utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
5
|
-
} else if (state === identifiers.SEM_POST) {
|
|
6
|
-
/* not used in this example */
|
|
7
|
-
}
|
|
8
|
-
return identifiers.SEM_OK;
|
|
9
|
-
};
|
|
10
|
-
export default token;
|