From b71976ee5d63a504d9ba7b34e8cc4b77615513bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Teichgr=C3=A4ber?= Date: Mon, 30 Apr 2012 00:55:37 +0200 Subject: [PATCH] add a mechanism that makes sure only an up-to-date parser.leg.go can be used --- markdown.go | 10 ++++++++++ parser.leg | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/markdown.go b/markdown.go index 2380d38..a78952d 100644 --- a/markdown.go +++ b/markdown.go @@ -24,6 +24,16 @@ import ( "strings" ) +const ( + // If you get a build error message saying that + // parserIfaceVersion_N is undefined, parser.leg.go + // either is not present or it is out of date. You should + // rebuild it using + // make nuke + // make parser + needParserIfaceVersion = parserIfaceVersion_1 +) + // Markdown Options: type Options struct { Smart bool diff --git a/parser.leg b/parser.leg index c79d8a5..3929c43 100644 --- a/parser.leg +++ b/parser.leg @@ -27,6 +27,10 @@ import ( "log" ) +const ( + parserIfaceVersion_1 = iota +) + // Semantic value of a parsing action. type element struct { key int