Indenting Based on Unbalanced Paranthesis

2012-11-29 Thread Danny Gratzer
I am writing an indentation script for a simple language. The language is has very simple constructs and the indentation really only has 3 rules: 1. A comment has goes from a // until a newline, anything in a comment should be ignored. 2. If the line above contains a semi-colon, the indentation s

Re: Indenting Based on Unbalanced Paranthesis

2012-11-29 Thread Danny Gratzer
Oh actually 1 more rule 4. If the line above matches "let:$", or "in:$" where $ is the end of line, indent by 1 more than this line. On Thu, Nov 29, 2012 at 5:24 PM, Danny Gratzer wrote: > I am writing an indentation script for a simple language. The language is > has very simple constructs and

Re: Indenting Based on Unbalanced Paranthesis

2012-11-29 Thread Danny Gratzer
Excuse me, rule 3. should read: 3. Otherwise, indent to 1 more than the most recent unbalanced ( and to the same level as the last line if all parenthesis are balanced and no other rules apply. On Thu, Nov 29, 2012 at 5:27 PM, Danny Gratzer wrote: > Oh actually 1 more rule > > 4. If the line

Re: Indenting Based on Unbalanced Paranthesis

2012-11-29 Thread Benjamin R. Haskell
[Reversed the top-posting, per list preference] On Thu, Nov 29, 2012 at 5:24 PM, Danny Gratzer wrote: I am writing an indentation script for a simple language. The language is has very simple constructs and the indentation really only has 3 rules: 1. A comment has goes from a // until a newl

Re: Indenting Based on Unbalanced Paranthesis

2012-11-29 Thread Ben Fritz
On Thursday, November 29, 2012 5:24:53 PM UTC-6, Danny Gratzer wrote: > I am writing an indentation script for a simple language. The language is has > very simple constructs and the indentation really only has 3 rules: > > > 1. A comment has goes from a // until a newline, anything in a comment

Re: Indenting Based on Unbalanced Paranthesis

2012-11-29 Thread Danny Gratzer
Apologizes for the top posting, No indenting exists for this previously, it's a language (currently unnamed) I'm writing as an experiment in functional programming and to learn to parse. I can't think of any other markers really, the syntax for the language is pretty minimalistic, here's a quick

Re: Indenting Based on Unbalanced Paranthesis

2012-11-30 Thread David Fishburn
On Thu, Nov 29, 2012 at 6:24 PM, Danny Gratzer wrote: > I am writing an indentation script for a simple language. The language is > has very simple constructs and the indentation really only has 3 rules: > ... Not sure if you have looked into this plugin: IndentAnything : Write indentations or