This repository has been archived by the owner on Mar 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename token types * Switch to govend for dep management * Remove Line and StartPosition types * omitempty for Line and StartPosition in node.go * Fix travis build / Add travis-ci badge * Update TODO.txt ALL THE TESTS PASS AGAIN :sparkles: :grin: :sparkles:
- Loading branch information
Showing
993 changed files
with
471,833 additions
and
7,746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
!* | ||
*.test | ||
c.out | ||
pkg/ | ||
bin/go-rst2html | ||
.cover/ | ||
*-session.vim | ||
refactor* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
language: go | ||
before_install: | ||
- go get github.com/mattn/goveralls | ||
script: | ||
- go test -v ./pkg/... | ||
- goveralls -service=travis-ci -v -package ./pkg/... -repotoken $COVERALLS_TOKEN || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
================ | ||
The Big Refactor | ||
================ | ||
|
||
----- | ||
About | ||
----- | ||
|
||
Deep flaws in the lexer/parser design were discovered when trying to integrate test 06.00.03.00 | ||
|
||
1. tokenizing is done one slice at a time, instead of one unicode code point at a time. | ||
|
||
This makes it difficult to handle unicode combining characters. | ||
|
||
A workaround was attemted by trying to normalize the input text, but this is not ideal. Mainly because of decomposition; | ||
'\u2000' decomposes to '\u2002` when normalized with the NFC form (`Unicode Normalization Forms`_), which according to the | ||
unicode spec are functionally identical. For a document syntax such as reStructuredText, this is not good because we want | ||
to preserve the original intent. | ||
|
||
#. The project directory structure is becoming unweildly. | ||
|
||
It's hard to understand the "flow" of the library. This will make it hard to gain new contributors. | ||
|
||
Also, having separate files for `lexer_*` and `parser_*` add increased complexity. | ||
|
||
#. | ||
|
||
#. Plugin support (directives) | ||
|
||
Need to start thinking about this... | ||
|
||
The https://github.com/golang-commonmark/markdown repository has a great design. | ||
|
||
---- | ||
TODO | ||
---- | ||
|
||
This might take a while. Let's plan. | ||
|
||
1. rename files to remove "parse\_" and "lexer\_" | ||
|
||
#. Use lifo stack for lexer/parser state instead of saveState() | ||
|
||
#. Lexer should use scanner.scan() | ||
|
||
* Should loop by unicode code points | ||
|
||
* Remove the need for norm.NFC | ||
|
||
#. remove EOL (utf.RuneError) | ||
|
||
#. remove the "parse" directory | ||
|
||
.. _Unicode Normalization Forms: http://unicode.org/reports/tr15/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Package parse is a reStructuredText parser implemented in Go! | ||
// | ||
// This package is only meant for lexing and parsing reStructuredText. See the top level package documentation for details on | ||
// using the go-rst package package API. | ||
package rst |
Oops, something went wrong.