Skip to content

Commit

Permalink
🐛 Always delcare tag symbols as references (#1648)
Browse files Browse the repository at this point in the history
  • Loading branch information
misode authored Nov 22, 2024
1 parent bbc5f27 commit 2de5efc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/service/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,10 @@ export const VanillaConfig: Config = {
],
then: { report: 'warning' },
},
{
if: { category: ['attribute_modifier', 'attribute_modifier_uuid', 'tag'] },
then: { declare: 'public' },
},
{
then: { declare: 'block' },
},
Expand Down
2 changes: 1 addition & 1 deletion packages/java-edition/src/mcfunction/mcdocAttributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function registerMcdocAttributes(meta: core.MetaRegistry, rootTreeNode: m
stringMocker: (_, __, ctx) => ScoreHolderNode.mock(ctx.offset),
})
mcdoc.runtime.registerAttribute(meta, 'tag', () => undefined, {
stringParser: () => parser.tag('definition'), // TODO: make this a config
stringParser: () => parser.tag('reference'),
stringMocker: (_, __, ctx) => core.SymbolNode.mock(ctx.offset, { category: 'tag' }),
})
mcdoc.runtime.registerAttribute(meta, 'block_predicate', () => undefined, {
Expand Down
3 changes: 0 additions & 3 deletions packages/java-edition/src/mcfunction/tree/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,6 @@ export function getPatch(release: ReleaseVersion): PartialRootTreeNode {
children: {
name: {
parser: 'spyglassmc:tag',
properties: {
usageType: 'definition',
},
},
},
},
Expand Down

0 comments on commit 2de5efc

Please sign in to comment.