View previous topic :: View next topic |
Author |
Message |
apoc2050
Joined: 24 Mar 2008 Posts: 3
|
Posted: Wed Mar 26, 2008 8:21 pm Post subject: Syntax Highlighting Issue |
|
|
First off, just wanted to let you guys know that this plug-in is awesome, there is just one syntax highlighting bug that is annoying me.
DMD version 1.027 using Tango libraries.
Here is the code in question.
Code: |
module oem.mrr.MrRoundIsNotASquare;
import tango.stdc.stringz;
import tango.io.Console;
import derelict.opengl.gl;
import derelict.sdl.sdl;
import derelict.opengl.glu;
const char[] GAME_TITLE = "My Game";
const int FRAMERATE = 60;
bool finished;
const int targetWidth = 800;
const int targetHeight = 600;
const int bitsPerPixel = 24;
const float fov = 90.0;
const float nearPlane = 0.1;
const float farPlane = 100.0;
void setupGL()
{
Cout("This gets syntax highlighting.");
// switch to the projection mode matrix
glMatrixMode(GL_PROJECTION);
//load the identity matrix for projection
glLoadIdentity();
// setup a perspective projection matrix
gluPerspective(fov, cast(float) targetWidth / targetHeight, nearPlane,
farPlane);
// switch back to the modelview transformation matrix
glMatrixMode(GL_MODELVIEW);
// load the identity matrix for modelview
glLoadIdentity();
}
//Rest of code.
|
Everything after Code: | glMatrixMode(GL_PROJECTION); | has no syntax highlighting, with the exception of primitive types, scope modifiers, and basic statement and controls. Here is a picture.
http://www.michaelmonte.com/wp-content/uploads/2008/03/descenteclipse.png
When running eclipse in debug mode I notice descent throws a NullPointerException whenever I try to open my code.
Code: |
!ENTRY descent.core 4 4 2008-03-26 21:44:55.836
!MESSAGE
!STACK 0
java.lang.NullPointerException
at descent.internal.compiler.lookup.RDsymbol$SignatureToType.getType(RDsymbol.java:633)
at descent.internal.compiler.lookup.RDsymbol.getTypeFromSignature(RDsymbol.java:1092)
at descent.internal.compiler.lookup.RDeclaration.getTypeFromField(RDeclaration.java:114)
at descent.internal.compiler.lookup.RVarDeclaration.type(RVarDeclaration.java:113)
at descent.internal.compiler.parser.DsymbolExp.semantic(DsymbolExp.java:86)
at descent.internal.compiler.parser.IdentifierExp.semantic(IdentifierExp.java:160)
at descent.internal.compiler.parser.UnaExp.semantic(UnaExp.java:99)
at descent.internal.compiler.parser.CallExp.semantic(CallExp.java:289)
at descent.internal.compiler.parser.ExpStatement.semantic(ExpStatement.java:89)
at descent.internal.compiler.parser.CompoundStatement.semantic(CompoundStatement.java:201)
at descent.internal.compiler.parser.FuncDeclaration.semantic3(FuncDeclaration.java:1564)
at descent.internal.compiler.parser.AggregateDeclaration.semantic3(AggregateDeclaration.java:181)
at descent.internal.compiler.parser.AttribDeclaration.semantic3(AttribDeclaration.java:129)
at descent.internal.compiler.parser.Module.semantic3(Module.java:223)
at descent.internal.compiler.parser.Module.semantic(Module.java:102)
at descent.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:341)
at descent.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:174)
at descent.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:161)
at descent.core.dom.ASTParser.internalCreateAST(ASTParser.java:869)
at descent.core.dom.ASTParser.createAST(ASTParser.java:661)
at descent.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:600)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at descent.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:595)
at descent.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
at descent.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:155)
at descent.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:140)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
|
Also to note, that dot completion does not work any more. It had worked at one point and I am not sure when it had stopped working.
Now my code, compiles and runs just fine and if imported into code::blocks the syntax highlighting is dead on.
I really like the eclipse style of syntax highlighting and code completion(me being primarily a Java coder) but this will make descent+eclipse no better than code::blocks and actually a little worse. I can post a bug report if needs be.
Thanks for any help you can give. |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
|
Back to top |
|
|
apoc2050
Joined: 24 Mar 2008 Posts: 3
|
Posted: Thu Mar 27, 2008 8:22 am Post subject: |
|
|
Thanks for the reply, one question about,
Quote: | If a module A depends on B, which in turns depends on B ... |
Im curious if you meant,
Quote: | If a module A depends on B, which in turn depends on A ... |
|
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Thu Mar 27, 2008 7:05 pm Post subject: |
|
|
Yes. I've corrected this, thanks. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|