Skip to content

Missing support for #include and #base directives #26

Closed
@ghost

Description

Hi.

Valve's KeyValues format supports two statements for including and merging other KeyValues files ( #include and #base), but trying to parse a vdf file using either statement causes a ParseError. Merging other files seems to be beyond the scope of this parser, but would it be possible to add an option that ignores statements like these instead of throwing an error?

Here's a stripped-down example from Team Fortress 2's population files:

minimal.pop:

#base robot_standard.pop

WaveSchedule
{

	StartingCurrency		1200
	RespawnWaveTime 		2
	CanBotsAttackWhileInSpawnRoom no
}

robot_standard.pop:

WaveSchedule
{
	Templates
	{
		// Sniper
		T_TFBot_Sniper
		{
			Class Sniper
			Skill Hard
			MaxVisionRange 2500
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions