summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2018-12-31 23:52:21 +0100
committerJoop Kiefte <ikojba@gmail.com>2018-12-31 23:52:21 +0100
commit9bfc11edbfcbe24fbd462ff9501fb4e036e1ca9b (patch)
tree201dfd9191169c97a454a487ab0d588e5e8fb662
parentd24f9890bb7b6253568235c2df4dc2c405badba8 (diff)
Add some comments
-rw-r--r--lex/parse.go4
-rw-r--r--lex/type.go1
-rw-r--r--rules/rules.go5
3 files changed, 8 insertions, 2 deletions
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
diff --git a/rules/rules.go b/rules/rules.go
index c71df9d..030fcb0 100644
--- a/rules/rules.go
+++ b/rules/rules.go
@@ -53,8 +53,9 @@ var Default = Set{
Width: 4,
},
"trans": {
- Left: 6,
- Width: 1.5,
+ Left: 1.5,
+ Width: 6,
+ Align: "R",
},
"note": {
Left: 1.5,