Menu

How can I: KeyWords in Prefix mode and showing corresponding ()?

xsxs
2013-12-30
2014-04-01
  • xsxs

    xsxs - 2013-12-30

    Hi,
    In an user defined language I defined for example MathMin as keyword in prefix mode.

    Now: x = MathMin(a, b);
    MathMin is highlighted as defined but not the (). Only if I write MathMin (a,b) with a blank before '('. Now - with blank - the () are highlighted as well, but if I (am forced to) do it that way I don't need the prefix mode. Even CTRL-Mouse-Click doesn't work now.

    Is there a way that I write: MathMin(a,b) - without blank - and MathMin is highlighted as well as the brackets surrounding a and b?

    To put my question in other words. The blank - and as I found out the ',' - 'stops' the prefix mode to capture the next characters. How can I define that the brackets '(' and ')' 'stops' the prefix mode - shouldn't that be the default?

    Or - a little suggestion - in the keyword-tab each styler offers an option to define characters the stops the prefix mode?

    Thanks in advance
    gooly

     

    Last edit: xsxs 2013-12-30
  • Loreia2

    Loreia2 - 2013-12-30

    Hi xsxs,

    How can I define that the brackets '(' and ')' 'stops' the prefix mode - shouldn't that be the default?

    Juste define ( and ) as Operator1 type. If you want them colored the same as MathMin, then define the same styler for Keyword1 and Operator1 type.

    BR,
    Loreia

     
  • xsxs

    xsxs - 2013-12-30

    ok, thanks, that works - but it is not very self-evident ;)

    And if do this the bracket-levels for the brackets define that way disappear (the box with '-' becoming red if the cursor is there on the left side of the np++).

    xsxs

     

    Last edit: xsxs 2013-12-30
  • miro

    miro - 2014-04-01

    Hi Loreia2,

    I'm want to use your UDL2.0 for "Cadence SKILL", I have the language file from the library
    how ever I would like to improve it to have similar behavior as the build in LISP (as SKILL is based on LISP) language. Problem is that I struggling with folding. I can not figure out how to set the folding to end the folding on the right "end" bracket.

    I hope you will help me or at least give me some link to study from.

    Regards,
    Miro