Skip to content

Conversation

@sikilde
Copy link
Contributor

@sikilde sikilde commented Aug 15, 2024

  • Variable highlight for REF_TO and Variant
  • Function highlights for REF, UPPER_BOUND and LOWER_BOUND
  • Highlightning of time/date constants (https://regex101.com/r/mjf24u/1):
DT#2089-12-31-23:59:59.999
LDT#1970-01-01-00:00:00.000000000
LDT#2262-04-11-23:47:16.854775807
DTL#1970-01-01-00:00:00.0
DTL#2262-04-11-23:47:16.854775807
LTOD#00:00:00.000000000 
LTOD#23:59:59.999999999
TOD#00:00:00.000 
TOD#23:59:59.999
D#1990-01-01
D#2169-06-06
LT#-106751d_23h_47m_16s_854ms_775us_808ns
LT#+106751d_23h_47m_16s_854ms_775us_807ns
LT#11350d_20h_25m_14s_830ms_652us_315ns
LTIME#11350d_20h_25m_14s_830ms_652us_315ns
T#-24d_20h_31m_23s_648ms 
T#+24d_20h_31m_23s_647ms
T#10d_20h_30m_20s_630ms
TIME#10d_20h_30m_20s_630ms
S5T#0MS
S5T#2H_46M_30S_0MS
S5T#10s
S5TIME#10s

"patterns": [
{
"match": "\\b(t|T|TIME)#(((([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)|\\d+)?d)?((([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)|\\d+)?h)?((([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)|\\d+)?m)?((([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)|\\d+)?s)?((([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)|\\d+)?ms)?)\\b",
"match": "\\b(S5TIME|S5T|TIME|LTIME|T|LT|D|TOD|LTOD|DT|DTL|LDT)#[0-9|+|-]*([^(\\s|;)]+)",
Copy link
Owner

@Gunders89 Gunders89 Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this. Maybe we should have a seperate one for

DT#1990-01-01-00:00:00.000
DT#2089-12-31-23:59:59.999
LDT#1970-01-01-00:00:00.000000000
LDT#2262-04-11-23:47:16.854775807
DTL#1970-01-01-00:00:00.0
DTL#2262-04-11-23:47:16.854775807
LTOD#00:00:00.000000000 
LTOD#23:59:59.999999999
TOD#00:00:00.000 
TOD#23:59:59.999
D#1990-01-01
D#2169-06-06

This solution does still highlight this T#106751ns_23asdasdasgfah_47s_16m_854d_775us_808ns124214s which to my knowledge is invalid timeformat (both order and characters).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should definately add nano and micro seconds!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants