newbspguy icon indicating copy to clipboard operation
newbspguy copied to clipboard

FGD parsing bug: FGD format is whitespace agnostic

Open mfaizsyahmi opened this issue 6 months ago • 0 comments

FGD format is whitespace agnostic. In reference implementation i.e. Hammer 3.x, as well as in JACK, you can spread a Class definition across several lines like so:

@PointClass 
	base(Target, Targetname, Light, ZHLT_point) 
	flags(Light) 
	iconsprite("sprites/light.spr") 
	= light : "Invisible lightsource." : "https://twhl.info/wiki/page/light"
[
	// entity attributes here
]

and it is valid FGD.

For some reason, bspguy's FGD parser doesn't do this, expecting the entire class definition to be on a single line.

mfaizsyahmi avatar Aug 09 '24 07:08 mfaizsyahmi