Page 1 of 1

Defining syntax

Posted: Fri Feb 06, 2015 3:28 am
by trevordevore
I've been looking at `syntax` entries in the ./libscript/src/*.mlc files. I would like to define some custom syntax in my mlc library if possible. I want to define the following syntax:

Code: Select all

put the host of url "http://www.livecode.com/test/index.html"
Is that possible in a library? If so, what is the syntax assuming I have a handler named `urlExtractBaseURL` that expects a string argument and returns a string?

Re: Defining syntax

Posted: Fri Feb 06, 2015 2:25 pm
by benjibeaumont
Hi Trevor,

Unfortunately not. That is what we'll be doing in version "9" with extensible syntax. At the moment all syntax in LCB is built into the compiler.

I put "9" in quotes because that's what we are terming it internally. It's just an extension of what we're doing in 8.0.. It doesn't mean it's a long time away. It all slated for 2015. It may not even be called 9.

Warm regards,

Ben

Re: Defining syntax

Posted: Mon Feb 09, 2015 4:49 pm
by Mikey
YIKES! 8 doesn't seem to be close (my bet would be late 3Q 2015), so getting 9 out in 2015 seems like a (sweet!) dream.