brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 45 forks source link

Indenter is off when there is a field without a trailing comma #200

Closed sorawee closed 7 years ago

sorawee commented 7 years ago
data A:
  | a with:
    b: 2
end

fun x():
1
end
blerner commented 7 years ago

That's weird... @belph can you take a look?

peblair commented 7 years ago

Will do.

On Fri, Jul 28, 2017, 6:15 PM Ben Lerner notifications@github.com wrote:

That's weird... @belph https://github.com/belph can you take a look?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/brownplt/code.pyret.org/issues/200#issuecomment-318774636, or mute the thread https://github.com/notifications/unsubscribe-auth/AExFz9goH8s17bAjOQA2uf22ZysTZKXwks5sSl2RgaJpZM4Om5J- .

peblair commented 7 years ago

This has been fixed. The problem (in case you're interested) was that the : was introducing a field indentation. , and } close that indentation, but end wasn't handling it correctly (since the dedenter for end needs to know to skip the "OBJECT" entry on the ls.tokens stack in that specific instance).

Regardless, it's fixed now, and I've added a regression for it to the pyret-codemirror-mode index.html file.