Page 1 of 1

SynWrite and CudaText differences

Posted: 27.05.2021 06:54
by Shovel
First two lines are not highlighted in CudaText. If this is not a bug I would appreciate any advice on how to fix it.

lexer in question - rule 'FuncCall'

Posted: 27.05.2021 12:10
by uvviewsoft
this lexer has unusual config for parsers 'id after .' and '^id'. you must set to both them the "token style", you missed it. (in the 'parser' tab.)
this token-style will colorize them. so you will not need to make the "rules" block for them, ok?

Posted: 27.05.2021 12:34
by Shovel
I'm trying to have separate colors for :

* keywords - listed in rule 'Keywords'
* builtin functions - rule 'Functions'
* 'id' tokens with a following '('
* all other 'id' tokens

I thought accomplishing this would be easier with Rules ('FuncCall' Rule), then creating more parsers.

I removed token style from 'id' parsers because I think I can't override that style from a Rule.

Posted: 27.05.2021 12:45
by uvviewsoft
Maybe Cud cannot handle this 'missed style' of tokens, assign some style to them. it's better to set style via 'parsers'! so better remove that 'rule' and do it via 'parser'.

parsing has 2 stages, and if you set style via 'parser', style will be found by stage-1 (else: stage-2).

Posted: 28.05.2021 07:18
by Shovel
Thanks, was simple to do with parsers, all is well now