Examples of ErlFunction


Examples of org.erlide.engine.internal.model.erlang.ErlFunction

            final OtpErlangObject val = el.elementAt(3);
            final OtpErlangObject extra = el.arity() > 4 ? el.elementAt(4) : null;
            final OtpErlangObject arity = el.arity() > 5 ? el.elementAt(5) : null;
            return addAttribute(module, pos, name, val, extra, arity);
        } else if ("function".equals(typeS)) {
            final ErlFunction f = makeErlFunction(module, el);
            final OtpErlangList clauses = (OtpErlangList) el.elementAt(6);
            final List<ErlFunctionClause> cls = Lists.newArrayListWithCapacity(clauses
                    .arity());
            for (int i = 0; i < clauses.arity(); i++) {
                final OtpErlangTuple clause = (OtpErlangTuple) clauses.elementAt(i);
                final ErlFunctionClause cl = makeErlFunctionClause(f, i, clause);
                cls.add(cl);
            }
            f.setChildren(cls);
            return f;
        } else {
            ErlLogger.debug("unknown: " + el);
        }
        return null;
View Full Code Here

Examples of org.erlide.engine.internal.model.erlang.ErlFunction

        final OtpErlangAtom name = (OtpErlangAtom) el.elementAt(2);
        final OtpErlangLong arity = (OtpErlangLong) el.elementAt(3);
        final OtpErlangList parameters = (OtpErlangList) el.elementAt(4);
        final OtpErlangObject head = el.elementAt(5);
        final OtpErlangTuple namePos = (OtpErlangTuple) el.elementAt(7);
        ErlFunction f = null;
        final OtpErlangAtom exportedA = (OtpErlangAtom) el.elementAt(8);
        final boolean exported = Boolean.parseBoolean(exportedA.atomValue());
        try {
            f = new ErlFunction(module, name.atomValue(), arity.intValue(),
                    Util.stringValue(head), exported, parameters);
        } catch (final OtpErlangRangeException e) {
            return f;
        }
        setPos(f, pos);
View Full Code Here

Examples of org.erlide.engine.new_model.internal.ErlFunction

        if (!_matched) {
          if (Objects.equal(_kind, "function")) {
            _matched=true;
            String _name_1 = node.getName();
            int _arg = node.getArg();
            _switchResult = new ErlFunction(source, _name_1, _arg);
          }
        }
        final ErlForm handle = _switchResult;
        final SourceElementBody body = new SourceElementBody();
        TextRange _pos = node.getPos();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.