mirror of
https://github.com/Kugelschieber/asl.git
synced 2026-01-18 12:00:25 +00:00
Added documentation, added new line before preprocessor line.
This commit is contained in:
@@ -57,8 +57,8 @@ func (c *Compiler) parseBlock() {
|
||||
}
|
||||
|
||||
func (c *Compiler) parsePreprocessor() {
|
||||
// we definitely want a new line here
|
||||
c.appendOut(c.get().Token+new_line, false)
|
||||
// we definitely want a new line before and after
|
||||
c.appendOut(new_line+c.get().Token+new_line, false)
|
||||
c.next()
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ func TestParserInlineCode(t *testing.T) {
|
||||
|
||||
func TestParserPreprocessor(t *testing.T) {
|
||||
got := getCompiled(t, "test/tokenizer_preprocessor.asl")
|
||||
want := "#define HELLO_WORLD \"Hello World!\"\r\nhint HELLO_WORLD;\r\n"
|
||||
want := "\r\n#define HELLO_WORLD \"Hello World!\"\r\nhint HELLO_WORLD;\r\n"
|
||||
|
||||
equal(t, got, want)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user