Changeset [fd9cdd7357a88d95e8b3400bf730bd3ed2675653] by Douglas Creager
Revision fd9cdd7357a88d95e8b3400bf730bd3ed2675653,
committed by Douglas Creager
· January 12th, 2009 @ 11:59 PM
Single-line comments
The CSPM compiler now supports single comments:
-- This is a comment
a = 5 -- this is a number b = 6 -- so is this
c = a + -- add them together
b
As shown in this example (which is in the test suite), a single-line comment counts as a newline. (If it didn't, the “a” and “b” variables wouldn't be properly defined, since a definition must end with a newline.)
Lighthouse: [#16] http://github.com/hst/hst/commit...
5 changed files
-
M
cspm/src/HST/CSPM/Lexer.lhs -
M
cspm/tests/mechanics/test-comments.sh -
M
cspm/tests/mechanics/test-newlines.sh -
M
cspm/tests/processes/test-newlines.sh -
M
cspm/tests/run-tests.sh