Does the compilation engine need to add indentation when generating XML?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Does the compilation engine need to add indentation when generating XML?

song
This post was updated on .
While developing the tokenizer, I noticed that the test files, such as MainT.xml and SquareT.xml, do not contain any indentation. The browser seems to add indentation automatically when displaying them.

However, files such as Main.xml and Square.xml do contain indentation.

Why is there a difference? Does the compilation engine need to add indentation when generating XML?


And one more question:

When compiling a do statement such as do subroutineCall, the book says to compile it as if its syntax were do expression.

So I did that, but my output contains additional tags such as <expression> and <term> compared with the provided comparison file.

Is that okay?