Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Terminal/Parser rule to support nested indent
Terminal/Parser rule to support nested indent [message #972929] Tue, 06 November 2012 01:06 Go to next message
Tinh Truong is currently offline Tinh TruongFriend
Messages: 2
Registered: July 2012
Junior Member
Hi everyone,
I want to build a DSL similar to jade (jade-lang.com)
doctype 5
html(lang="en")
  head
    title= pageTitle
    script(type='text/javascript')
      if (foo) {
         bar()
      }
  body
    h1 Jade - node template engine
    #container
      if youAreUsingJade
        p You are amazing
      else
        p Get on it!

I don't know if it's possible in XText?
Any input is welcomed.

Tinh
Re: Terminal/Parser rule to support nested indent [message #973864 is a reply to message #972929] Tue, 06 November 2012 17:26 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 2961
Registered: July 2009
Senior Member
Tinh,

yes that's possible with Xtext, e.g.
https://github.com/sebastianbenz/eclipse-task-editor
implements an indentation based language.

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 06.11.12 16:53, schrieb Tinh Truong:
> Hi everyone,
> I want to build a DSL similar to jade (jade-lang.com)
> doctype 5
> html(lang="en")
> head
> title= pageTitle
> script(type='text/javascript')
> if (foo) {
> bar()
> }
> body
> h1 Jade - node template engine
> #container
> if youAreUsingJade
> p You are amazing
> else
> p Get on it!
> I don't know if it's possible in XText?
> Any input is welcomed.
>
> Tinh
>
Re: Terminal/Parser rule to support nested indent [message #978717 is a reply to message #973864] Sat, 10 November 2012 08:58 Go to previous messageGo to next message
Tinh Truong is currently offline Tinh TruongFriend
Messages: 2
Registered: July 2012
Junior Member
This is exactly what I am looking for!
Thanks Sebastian!
Re: Terminal/Parser rule to support nested indent [message #1023820 is a reply to message #978717] Mon, 25 March 2013 08:36 Go to previous message
Paul Verest is currently offline Paul VerestFriend
Messages: 35
Registered: March 2013
Member
Hi Tinh Truong

Have you succeeded?

I am looking for Jade editor for Eclipse.
So far nobody with XTEXT knowledge started Jade support.

[Updated on: Sun, 14 July 2013 09:17]

Report message to a moderator

Previous Topic:Language supporting Integers, Floats, Hex Numbers and Range Expressions
Next Topic:Xtext Standalone Code Generator build with Maven
Goto Forum:
  


Current Time: Thu Dec 18 05:39:26 GMT 2014

Powered by FUDForum. Page generated in 0.05973 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software