Changeset [fd9cdd7357a88d95e8b3400bf730bd3ed2675653] 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...

Committed by Douglas Creager

  • 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
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

An open-source refinement checker for the CSP process algebra.