From 9bfc11edbfcbe24fbd462ff9501fb4e036e1ca9b Mon Sep 17 00:00:00 2001 From: Joop Kiefte Date: Mon, 31 Dec 2018 23:52:21 +0100 Subject: Add some comments --- lex/parse.go | 4 ++++ lex/type.go | 1 + 2 files changed, 5 insertions(+) (limited to 'lex') diff --git a/lex/parse.go b/lex/parse.go index ebd4dda..e105a22 100644 --- a/lex/parse.go +++ b/lex/parse.go @@ -6,6 +6,10 @@ import ( "strings" ) +//Parse walks through the lex file, which contains the element of a screenplay, +//optionally followed by a colon and space and the actual contents of that element. +//Special elements exist: newpage, titlepage and metasection. +//These elements trigger pdf creation instructions. func Parse(file io.Reader) (out Screenplay) { f := bufio.NewReader(file) var err error diff --git a/lex/type.go b/lex/type.go index 3b49eee..eec2f3e 100644 --- a/lex/type.go +++ b/lex/type.go @@ -1,3 +1,4 @@ +// The lex format is basically a parse tree for screenplays, which enables quick debugging. package lex type Screenplay []Line -- cgit v1.2.3-70-g09d2