Commit 0810f729 authored by Clemens Pflaum's avatar Clemens Pflaum

fixed minor errors

parent 293af80a
......@@ -6,7 +6,7 @@ public class NoOpErrorReporter implements IErrorReporter
public void report(ErrorType type, ErrorSource source, ErrorCode errorCode,
String message, Position start, Position end)
{
System.out.println("Noop: you have an Error: \n" +
System.out.println("NoOp: you have an Error: \n" +
"start:"+start+" end:"+end+" " + message);
}
......
......@@ -3,7 +3,6 @@ package de.in.tum.www2.cup.ast;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.FieldDeclaration;
......@@ -29,7 +28,6 @@ public class BindingCollector extends ASTVisitor {
@Override
public boolean visit(FieldDeclaration node) {
System.out.println("buhu");
for (Iterator iter = node.fragments().iterator(); iter.hasNext();) {
VariableDeclarationFragment fragment = (VariableDeclarationFragment) iter.next();
IVariableBinding binding= (IVariableBinding) fragment.resolveBinding();
......
......@@ -92,6 +92,8 @@ public abstract class CodeBlock extends AbstractNode {
for (IProblem problem : problems) {
// Adding 2 here is a hack: "{:"
// TODO: Position needs line and column number
int start = problem.getSourceStart() - dummyClassOffset + cupOffset + 2;
int end = problem.getSourceEnd() - dummyClassOffset + cupOffset + 2;
errMan.Warning(ErrorSource.Parser, problem.getMessage(),
Position.fromOffset(problem.getSourceStart() - dummyClassOffset + cupOffset + 2),
Position.fromOffset(problem.getSourceEnd() - dummyClassOffset + cupOffset + 2));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment