String before symbol formatted in my User Defined Language UDL
-
What I am trying to do I think is simple. I want to have properties in my language a different color from the standard text. Properties are defined as this
[ANYTEXT]:That is any text followed by a colon then usually a space but it doesn’t have to be. Examples are
Id:
Text:
text:
height:This is similar to what the standard PowerShell style does when N++ is installed except backwards. Its bold anything after the dollar sign $ANYVARIABLENAME
Even when you use the dot(.) the bold stops.
Can someone tell me how to implement these within my UDL?
-
how is the property glued to the object?
I’m thinking of using these “glue”-chars as delimiters.Cheers
Claudia -
Not sure i know exactly what you mean by glued? That might be another thing about UDLs i dont understand. however the structure is as follows
Object { property1: value 1 property2: value2 InnerObject { Innerproperty1: innervalue1 } property3: value3 }
-
Looks a lot like JSON.
-
I thought we are talking about object oriented programming/scripting language which do
have syntax like object.property or object->function etc.I think, the closest would be something like
delimiter1:
open={
close=}
and set nesting to delimiter1, delimiter2 and keywords… (I assume you have keywords defined)delimiter2:
open=((EOL))
close=:
and set nesting to delimiter1 and keywords.Not exactly what you want but I assume closest possible.
Cheers
Claudia -
So the language is QML. I am very new to QML and have been required by my new job to look into it. I found a few QML UDLs already defined but they dont have anything styled specific for the properties. What i am looking for is very simple id like to define something that allows any text or number sequence before a colon gets bolded and a specific color.
In some languages i see this to some degree. In my original post i mention powershell. in that language when you type the dollar sign it automatically bolds it and then any combination of text and numbers that follow. I am looking for something very specific to that.
This may seem simple but i have not been able to get it done, and i would greatly benefit from implementing this in my QML ventures.
-
builtin lexers, lexers provided by plugins and UDL are different,
because they are developed by different programmers. A functionality
of one lexer doesn’t indicate it is available in another lexer.
It looks like your request cannot be solved by UDL completely.Cheers
Claudia -
Okay thanks, I figured it wasnt going to work out but i thought id ask.
-