[ANN] "language-livecode" 0.6.0 for Atom Editor

Peter Haworth pete at lcsql.com
Sat Oct 24 12:45:08 EDT 2015


Thanks Monte.  I agree with your choice.  FYI, the LC module for Textmate
does it per your first example with the case, and all the statements under
it at the same indent level, not pretty.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Fri, Oct 23, 2015 at 11:58 PM, Monte Goulding <
monte at sweattechnologies.com> wrote:

>
> > On 24 Oct 2015, at 2:25 am, Peter TB Brett <peter.brett at livecode.com>
> wrote:
> >
> > Urgh, this is pretty broken in the 0.6.0.  I'll file an issue and try to
> make sure it's fixed for the next release.
>
> I’ve submitted a fix for this and the indenting issues. There’s still a
> bit of a quirk with switch indenting because there appears to be no way to
> support the layout we are used to. The two choices we have that are bug
> free are:
>
> No case indentation:
>
> switch thing
>    case thing1
>    code
>    break
>    case thing2
>    code
>    break
> end switch
>
> or increase and decrease indent on case
>
> switch thing
> case thing1
>    code
>    break
> case thing2
>    code
>    break
> end switch
>
> I have implemented the latter because I think it is more readable and
> helpful when scanning code. The way it was originally implemented it relied
> on break to decrease the indent so it would look like this:
>
> switch thing
>    case thing1
>       code
>    break
>    case thing2
>       code
>    break
> end switch
>
> The problem here is the break should be part of the case block and if the
> developer wants continuation and therefore doesn’t use break the
> indentation gets messed up. It’s worthwhile noting that other language
> packages I looked at seem to use the no case indentation style but I’m not
> a fan… Anyone have any thoughts on this?
>
> Cheers
>
> Monte
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list