Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature Request
about: Describes a feature, wanted to be added to ZeroSyntax
title: "[FEATURE]"
assignees: ''

---

# Description
- Describe the feature

# Why
- Why is the feature needed
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "ZeroSyntax-Server",
"description": "Language server for Generals Zero Hour INI files",
"icon": "images/icon.png",
"version": "0.1.4",
"version": "0.1.5",
"publisher": "ViTeXFTW",
"author": {
"name": "ViTeXFTW",
Expand Down
1 change: 1 addition & 0 deletions server/src/diagnostic/classVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class ClassVisitor extends AbstractParseTreeVisitor<void> implements MapI
} else if (child instanceof SoundEffectClassesContext) {
//TODO: Add SoundEffect Classes List
} else if (child instanceof SpecialPowerClassContext && child.specialpower_value()) {
console.log(`Added ${child.specialpower_value()!.getText()} to customSpecialPower`)
list.customSpecialPower.remove(child.specialpower_value()!.getText())
list.customSpecialPower.insert(child.specialpower_value()!.getText())
} else if (child instanceof UpgradeClassContext && child.upgrade_value()) {
Expand Down
15 changes: 10 additions & 5 deletions server/src/diagnostic/diagnosticsVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export class DiagnosticVisitor extends AbstractParseTreeVisitor<void> implements
// }

visitObjectClass_drawModules(ctx: ObjectClass_drawModulesContext): void {
console.log(list.customConditionStates)
list.customConditionStates.clear()
this.visitChildren(ctx)
}
Expand Down Expand Up @@ -402,6 +403,7 @@ export class DiagnosticVisitor extends AbstractParseTreeVisitor<void> implements
}
}
}
this.visitChildren(ctx)
}

visitDrawModule_transitionStateBlock(ctx: DrawModule_transitionStateBlockContext): void {
Expand All @@ -410,7 +412,7 @@ export class DiagnosticVisitor extends AbstractParseTreeVisitor<void> implements
if (!list.customConditionStates.find(state.ID()!.getText())) {
const severity = DiagnosticSeverity.Error
const start = new Location(state.ID()!.symbol.line, state.ID()!.symbol.column)
const msg = `Custom condition state ${state.ID()!.getText()} is not defined`
const msg = `Custom condition state ${state.ID()!.getText()} is not defined. If this is a TransitionKey, please define it above this`
this.addDiagnostic(severity, start, start, msg)
}
}
Expand All @@ -419,12 +421,15 @@ export class DiagnosticVisitor extends AbstractParseTreeVisitor<void> implements
}

visitDrawModule_transitionKeyProperty(ctx: DrawModule_transitionKeyPropertyContext): void {
const ID_text = ctx.transitionKey_value().ID()!.getText()

console.log(`Adding ${ID_text} to customConditionStates in context ${ctx.getText()}`)
if (ctx.transitionKey_value().ID()) {
const ID_text = ctx.transitionKey_value().ID()!.getText()

list.customConditionStates.remove(ID_text)
list.customConditionStates.insert(ID_text)
console.log(`Adding ${ID_text} to customConditionStates in context ${ctx.getText()}`)

list.customConditionStates.remove(ID_text)
list.customConditionStates.insert(ID_text)
}
}

private addDiagnostic(severity: DiagnosticSeverity, start: Location, end: Location, msg: string, srcAppend: string = ''): void {
Expand Down
26 changes: 25 additions & 1 deletion server/src/utils/antlr4ng/.antlr/MapIni.interp

Large diffs are not rendered by default.

Loading