Commit b683080f authored by Matthew Dawson's avatar Matthew Dawson
Browse files

When parsing Matlab code, make sure the parsed code always ends in a newline.

The grammar file requires Matlab expressions, it expects the expression to end
with a newline.  However, lots of generated code doesn't.  Thus force this to be
always correct.  Note that any extra newlines shouldn't cause issues.

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10661 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent f5d9a802
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ final public class MatlabParser implements MatlabExpressionWithSubExpression {
    public MatlabParser(VariableParser variableListing, String matlabCode) {
        m_variableParser = variableListing;
        m_opStack.addFirst(new ExpressionStackContainer(0, this));
        parseMatlabCode(matlabCode);
        parseMatlabCode(matlabCode + "\n");
    }

    private void parseMatlabCode(String matlabCode) {