Skip to content

Fix parser failing with irregular description syntax#1

Open
Blixibon wants to merge 1 commit intopySourceSDK:masterfrom
Blixibon:parser-irregular-descriptions-fix
Open

Fix parser failing with irregular description syntax#1
Blixibon wants to merge 1 commit intopySourceSDK:masterfrom
Blixibon:parser-irregular-descriptions-fix

Conversation

@Blixibon
Copy link
Copy Markdown

This fixes the FGD parser failing when it encounters either a trailing + at the end of a description or an input without a description defined.

For example, the following two cases occur in the default halflife2.fgd that cause the FGD to be cut off:

 	fadescale(float) : "Fade Scale" : 1 : "If you specify a fade in the worldspawn, or if the engine is running
 	under dx7, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified." +
+	" This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades." +
	input Crouch(void) : "Crouch down"
	input Stand(void) : "Stand up from crouch"
+	input DisableCrouchWalk(void)
+	input EnableCrouchWalk(void)

I tested this and it parses the entire stock HL2 FGD with the descriptions (or lack thereof) intact, but I'm not particularly familiar with pyparsing, so let me know if this wasn't the correct way of fixing this.

Fixes parsing of I/O with no descriptions and descriptions with trailing +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant