-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update textmate support #7971
base: master
Are you sure you want to change the base?
Update textmate support #7971
Conversation
947aa7a
to
167883c
Compare
167883c
to
17a6a99
Compare
@matthiasblaesing Unfortunately I dunno whether I did smth wrong here. I downloaded your build and tried it out. I got this exception.
For this example code: // door_stopper_simple ();
module door_stopper_simple ()
{
height = 20 ;
length = 125 ;
width= 40 ;
half_width = width / 2;
borders = 10; // 1 cm on each side
top_cube_length = length - 4 * borders;
top_cube_width = width - 2 * borders;
top_cube_height = height ; // make it big enough
top_z = height/2 + 4 ; // adjust manually ;)
tip_cut_pos = length/2 - 0.5;
difference() {
translate ([-length/2.0, 0, 0]) {
polyhedron (
points = [[0, -half_width, height], [0, half_width, height], [0, half_width, 0], [0, -half_width, 0], [length, -half_width, 0], [length, half_width, 0]],
triangles = [[0,3,2], [0,2,1], [3,0,4], [1,2,5], [0,5,4], [0,1,5], [5,2,4], [4,2,3], ]);
}
// top inset
translate ([-1 * borders, 0, top_z]) {
# cube ([top_cube_length,
top_cube_width,
top_cube_height],
center=true) ;
}
// cut of the tip a bit
translate ([tip_cut_pos, 0, 0]) {
# cube ([20,
width + 1,
height],
center=true) ;
}
}
}
door_stopper_simple (); |
@Chris2011 thanks for the test. Yeah, you hit a different limitation than I did. The problem is the construct in the second line of the regexp:
It has an unlimited length, which is not yet supported by joni. Oniguruma added support for it in 2020, but it seems, that noone ported that. The grammar can be trivially be fixed. Change line 33 to:
And you should be good. At this point NetBeans does not use the extractacted values and the look-behind only ensures, that this match requires a variable before it. For the coloring it does not matter. |
I thought that the regex will a problem here. I will change the regex and will try it again and let you know. Thx. |
After changing the mentioned line, it is working now. Thx a lot. |
It was observed, that some grammars were not accepted by the textmate grammar support. One such example was a C#-grammar. Updating textmate4eclipse, jcondings and joni fixes the issue.
Following the updates of the binaries, usesites of tm4e needed to be updated to accommodate for changed api in tm4j.
Unittests for textmate.lexer were fixed prior to update. For this the LayerBuilder needed to be fixed, as it failed for resources in the default package, which was used by the test. Slight changes to the unittests were necessary to follow the new API.