Package org.luaj.vm2.lib

Examples of org.luaj.vm2.lib.DebugLib$DebugInfo


        return null;
    }

    /** {@inheritDoc} */
    public String debugString() {
        DebugInfo info = debugInfo();
        return info != null ? info.debugString() : "";
    }
View Full Code Here


     * @param n the node
     * @throws ParseException
     */
    void jjtreeCloseNodeScope(JexlNode n) throws ParseException {
        if (n instanceof ASTAmbiguous && n.jjtGetNumChildren() > 0) {
            DebugInfo dbgInfo = null;
            Token tok = this.getToken(0);
            if (tok != null) {
                dbgInfo = new DebugInfo(tok.image, tok.beginLine, tok.beginColumn);
            } else {
                dbgInfo = n.debugInfo();
            }
            throw new JexlException.Parsing(dbgInfo, "Ambiguous statement, missing ';' between expressions", null);
        }
View Full Code Here

    }

    public Expression parse(String expressionString, int line, int column) throws ExpressionParsingException {
        org.apache.commons.jexl2.Expression compiledExpression;
        try {
            DebugInfo debug = new DebugInfo(expressionString, line, column);
            compiledExpression = engine.createExpression(expressionString, debug);
        } catch (JexlException e) {
            throw new ExpressionParsingException(line, column, expressionString, e);
        }
View Full Code Here

    private DebugInfo createDebugInfo(BpelObject bpelObject, String description) {
        int lineNo = bpelObject == null ? -1 : bpelObject.getLineNo();
        String str = description == null && bpelObject != null ? bpelObject.toString() : null;
        Map<QName, Object> extElmt = bpelObject == null ? null : bpelObject.getExtensibilityElements();
        DebugInfo debugInfo = new DebugInfo(_processDef.getSource(), lineNo, extElmt);
        debugInfo.description = str;
        return debugInfo;
    }
View Full Code Here

    private DebugInfo createDebugInfo(BpelObject bpelObject, String description) {
        int lineNo = bpelObject == null ? -1 : bpelObject.getLineNo();
        String str = description == null && bpelObject != null ? bpelObject.toString() : null;
        Map<QName, Object> extElmt = bpelObject == null ? null : bpelObject.getExtensibilityElements();
        DebugInfo debugInfo = new DebugInfo(_processDef.getSource(), lineNo, extElmt);
        debugInfo.description = str;
        return debugInfo;
    }
View Full Code Here

            OAssign.Copy ocopy = new OAssign.Copy(_context.getOProcess());
                ocopy.keepSrcElementName = scopy.isKeepSrcElement();
                ocopy.ignoreMissingFromData = scopy.isIgnoreMissingFromData();
                ocopy.insertMissingToData = scopy.isInsertMissingToData();
                ocopy.ignoreUninitializedFromVariable = scopy.isIgnoreUninitializedFromVariable();
                ocopy.debugInfo = new DebugInfo(_context.getSourceLocation(), scopy.getLineNo(),
                        source.getExtensibilityElements());
                try {
                    if (scopy.getFrom() == null)
                        throw new CompilationException(__cmsgs.errMissingFromSpec().setSource(scopy));
                    ocopy.from = compileFrom(scopy.getFrom());
                    if (scopy.getTo() == null)
                        throw new CompilationException(__cmsgs.errMissingToSpec().setSource(scopy));
                    ocopy.to = compileTo(scopy.getTo());

                    verifyCopy(ocopy);
                    oassign.operations.add(ocopy);

                } catch (CompilationException ce) {
                    _context.recoveredFromError(scopy, ce);
                }
          } else if (operation instanceof ExtensionAssignOperation) {
            ExtensionAssignOperation sop = (ExtensionAssignOperation)operation;
            OAssign.ExtensionAssignOperation oext = new OAssign.ExtensionAssignOperation(_context.getOProcess());
            oext.debugInfo = new DebugInfo(_context.getSourceLocation(), sop.getLineNo(), source.getExtensibilityElements());
            try {
              if (source.is20Draft()) {
                throw new CompilationException(__cmsgs.errExtensibleAssignNotSupported());
              }
              Element el = sop.getNestedElement();
View Full Code Here

import java.io.IOException;

public class ModuleExecutor {
    public String run(IWikiModel model, String module, String method, Frame frame) throws IOException {
        final Globals globals = getGlobals();
        MwCommon common = new MwCommon(model, globals);
        return common.execute(module, method, frame);
    }
View Full Code Here

        MwCommon common = new MwCommon(model, globals);
        return common.execute(module, method, frame);
    }

    private Globals getGlobals() {
        final Globals globals = JsePlatform.standardGlobals();
//        LuaJC.install(globals);
        return globals;
    }
View Full Code Here

                    defaultAnimationName = animationName; // set first animation as the default one
                }
            }
            catch (SpriteException ex) {
                // Error in the input file.
                throw new LuaError(ex);
            }
            catch (Exception ex) {
                // Error in the editor.
                ex.printStackTrace();
                throw new LuaError(ex);
            }

            return LuaValue.NIL;
        }
View Full Code Here

            LuaC.install();
            LuaTable environment = LuaValue.tableOf();

            environment.set("animation", new AnimationFunction());

            LuaFunction code = LoadState.load(new FileInputStream(spriteFile),
                spriteFile.getName(), environment);
            code.call();
        }
        catch (IOException ex) {
            throw new SpriteException(ex.getMessage());
        }
        catch (LuaError ex) {
View Full Code Here

TOP

Related Classes of org.luaj.vm2.lib.DebugLib$DebugInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.