mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Fix #654 disable the remaining simplifiedTypeDef caching logic in mcdoc
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
|
diff --git a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
|
||||||
index 2d51735..70ac4a0 100644
|
index 2d51735..e37d8cc 100644
|
||||||
--- a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
|
--- a/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
|
||||||
+++ b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
|
+++ b/node_modules/@spyglassmc/mcdoc/lib/runtime/checker/index.js
|
||||||
@@ -545,9 +545,9 @@ function simplifyReference(typeDef, context) {
|
@@ -545,9 +545,9 @@ function simplifyReference(typeDef, context) {
|
||||||
@@ -42,3 +42,48 @@ index 2d51735..70ac4a0 100644
|
|||||||
return simplifiedResult;
|
return simplifiedResult;
|
||||||
}
|
}
|
||||||
function simplifyDispatcher(typeDef, context) {
|
function simplifyDispatcher(typeDef, context) {
|
||||||
|
@@ -604,23 +604,23 @@ function resolveIndices(parallelIndices, symbolMap, symbolQuery, context) {
|
||||||
|
let dynamicData = false;
|
||||||
|
let values = [];
|
||||||
|
function pushValue(key, data) {
|
||||||
|
- if (data.simplifiedTypeDef) {
|
||||||
|
- if (data.simplifiedTypeDef.kind === 'union') {
|
||||||
|
- values.push(...data.simplifiedTypeDef.members);
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- values.push(data.simplifiedTypeDef);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
+ // if (data.simplifiedTypeDef) {
|
||||||
|
+ // if (data.simplifiedTypeDef.kind === 'union') {
|
||||||
|
+ // values.push(...data.simplifiedTypeDef.members);
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
+ // values.push(data.simplifiedTypeDef);
|
||||||
|
+ // }
|
||||||
|
+ // }
|
||||||
|
+ // else {
|
||||||
|
const simplifiedResult = simplify(data.typeDef, context);
|
||||||
|
if (simplifiedResult.dynamicData) {
|
||||||
|
dynamicData = true;
|
||||||
|
}
|
||||||
|
else if (symbolQuery) {
|
||||||
|
- symbolQuery.member(key, s => s.amend({
|
||||||
|
- data: { data: { ...data, simplifiedTypeDef: simplifiedResult.typeDef } },
|
||||||
|
- }));
|
||||||
|
+ // symbolQuery.member(key, s => s.amend({
|
||||||
|
+ // data: { data: { ...data, simplifiedTypeDef: simplifiedResult.typeDef } },
|
||||||
|
+ // }));
|
||||||
|
}
|
||||||
|
if (simplifiedResult.typeDef.kind === 'union') {
|
||||||
|
values.push(...simplifiedResult.typeDef.members);
|
||||||
|
@@ -628,7 +628,7 @@ function resolveIndices(parallelIndices, symbolMap, symbolQuery, context) {
|
||||||
|
else {
|
||||||
|
values.push(simplifiedResult.typeDef);
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
+ // }
|
||||||
|
}
|
||||||
|
let unkownTypeDef = false;
|
||||||
|
function getUnknownTypeDef() {
|
||||||
|
|||||||
Reference in New Issue
Block a user