ParserDefinition.createElement()

I have started an custom language plugin and run into many troubles.
One is the createElement() method of the ParserDefinition. It is only
called for the top-level elements, but not for nested ones.
Eq., the parser returnes the following markes
Marker.mark()
Marker.mark()
Marker.done(IDENTIFIER)
Marker.done(BLOCK)
So the createElement() is only called for the BLOCK, which get's an
ASTNode constisting of CompositeElements and the IDENTIFIER.

How can I wrap also the sub-elements?

3 comments
Comment actions Permalink

No response :(

Sven Steiniger schrieb:

I have started an custom language plugin and run into many troubles.
One is the createElement() method of the ParserDefinition. It is only
called for the top-level elements, but not for nested ones.
Eq., the parser returnes the following markes
Marker.mark()
Marker.mark()
Marker.done(IDENTIFIER)
Marker.done(BLOCK)
So the createElement() is only called for the BLOCK, which get's an
ASTNode constisting of CompositeElements and the IDENTIFIER.

How can I wrap also the sub-elements?

0
Comment actions Permalink

Hmm, works fine for me. Can you post some more details about your parser's code?

Sascha

Sven Steiniger wrote:

No response :(

Sven Steiniger schrieb:

>> I have started an custom language plugin and run into many troubles.
>> One is the createElement() method of the ParserDefinition. It is only
>> called for the top-level elements, but not for nested ones.
>> Eq., the parser returnes the following markes
>> Marker.mark()
>> Marker.mark()
>> Marker.done(IDENTIFIER)
>> Marker.done(BLOCK)
>> So the createElement() is only called for the BLOCK, which get's an
>> ASTNode constisting of CompositeElements and the IDENTIFIER.
>>
>> How can I wrap also the sub-elements?

0
Comment actions Permalink

Seems my lexer-adapter didn't work like IDEA expected.
Using the skeleton from the dev-package fixed the issue.

Sascha Weinreuter schrieb:

Hmm, works fine for me. Can you post some more details about your parser's code?

Sascha

Sven Steiniger wrote:

>>No response :(
>>
>>Sven Steiniger schrieb:
>>
>>
>>>I have started an custom language plugin and run into many troubles.
>>>One is the createElement() method of the ParserDefinition. It is only
>>>called for the top-level elements, but not for nested ones.
>>>Eq., the parser returnes the following markes
>>> Marker.mark()
>>> Marker.mark()
>>> Marker.done(IDENTIFIER)
>>> Marker.done(BLOCK)
>>>So the createElement() is only called for the BLOCK, which get's an
>>>ASTNode constisting of CompositeElements and the IDENTIFIER.
>>>
>>>How can I wrap also the sub-elements?

0

Please sign in to leave a comment.