Arc Forumnew | comments | leaders | submitlogin
2 points by Pauan 4292 days ago | link | parent

I've made the following changes to the Nuit spec:

---

The # sigil now ignores everything that's indented further than the sigil:

  Nuit  #foo bar
          qux corge
         @nou yes
            maybe someday
        @not included
  JSON  ["not", included"]
---

The ` and " sigils now have significantly different indentation rules. In particular, `foobar is now invalid: there must always be a space after the sigil. This change means that you can now include spaces at the front of a string without using a Unicode escape:

  Nuit  `  foobar
  JSON  " foobar"
---

The " sigil supports two new escapes: \s inserts a space and \n inserts a newline. These are just conveniences for \u(20) and \u(A) respectively. This makes it a lot easier to include spaces at the end of a single-line string.

---

I got rid of the \ sigil because it's not necessary: you can just prefix the line with ` or " to get the same effect.

---

I specified that strings within a Unicode escape must be separated by only one space. That means this is valid:

  \u(20 A D20)
But these are all invalid:

  \u( 20 A D20)
  \u(20  A D20)
  \u(20 A D20 )


1 point by rocketnia 4292 days ago | link

"I specified that strings within a Unicode escape must be separated by only one space."

Drat. I thought of it as a nifty way to split a large chunk of escape sequences over multiple lines. It's not like I was ever going to want to do that, though.

-----

2 points by Pauan 4292 days ago | link

That was actually never possible, because of the way the parser chunks the stream into lines and then operates on each individual line. I had considered making it possible... but I think that would have been too confusing. And it would have been far too little gain for too much work...

-----

1 point by rocketnia 4292 days ago | link

I like this line of reasoning. ^_^

-----