Documentation ¶
Overview ¶
Package language contains definitions of all the languages that the judge supports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLanguages ¶
GetLanguages returns all installed languages, mapped from language ID to the language itself.
func GuessLanguage ¶
GuessLanguage tries to detect the language of the given uncompiled program.
func TagName ¶
func TagName(group runpb.LanguageGroup) string
Types ¶
type CompileFunc ¶
type CompileFunc func(program *runpb.Program, outputPath string, client execpb.ExecuteServiceClient) (*compilers.Compilation, error)
CompileFunc is a function used to compile a program into the given path. It may use calls to the execution service in order to perform the compilation.
type Language ¶
type Language struct { // An identifier for this language. // This is suitable for inclusion in URLs, and can be displayed externally. Id string // The language (runtime or compiler) version that this language belongs to. Version string // The language group that this language belongs to. LanguageGroup runpb.LanguageGroup // The compile function that should be used to compile programs of this language. Compile CompileFunc // The run function that should be used to run compiled programs of this language. Program runners.RunFunc }
Language represents a programming language.
func GetLanguage ¶
GetLanguage returns the language with the given id. The second parameter designates whether a language with this ID existed.
func (*Language) ToApiLanguage ¶
ToApiLanguage converts the internal language to the external API representaiton.