PdefValidator

nscn.polaris2.pdefgen.PdefValidator
object PdefValidator

Checks parsed .pdef files before anything is generated from them.

Every problem caught here would otherwise turn up later and worse: as a scalac error pointing into generated code, or - for a field declared twice - as no error at all, just a codec one field short.

The files are checked as one unit because they are generated into one package: a type declared in one file is in scope in all of them, and a name declared twice collides whichever files the two declarations are in.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def check(files: Seq[PdefFile]): Seq[PdefProblem]

Every problem in files, in file order and then source order.

Every problem in files, in file order and then source order.

Attributes

def validate(files: Seq[PdefFile]): Seq[Pdef]

One Pdef per file, or a failure listing every problem rather than the first.

One Pdef per file, or a failure listing every problem rather than the first.

Attributes

Concrete fields

val maxEnumCases: Int

A pdef enum is written as its ordinal in a single unsigned byte.

A pdef enum is written as its ordinal in a single unsigned byte.

Attributes