Package com.orange.wink.parse

Examples of com.orange.wink.parse.WinkParser


   * @return
   * @throws WinkAstException
   * @throws WinkParseException
   */
  private static GlobalObject parseFile(final String f, final String[] externals, final List<FunctionObject> fns, final List<LiteralObject> lits) throws WinkAstException, WinkParseException {
    final WinkParser wp = new WinkParser();
    final List<String> fileNames = new ArrayList<String>();
    if (externals != null) {
      Collections.addAll(fileNames, externals);
    }
    fileNames.add(f);
    wp.parse(fileNames);
    // wp.print();

    final GlobalObject scope = wp.getGlobalScope();
    if (scope != null) {
      getFunctions(fns, scope);
      getLiterals(lits, scope);
    }

View Full Code Here


    final List<String> files = Common.newArrayList(1);
    files.addAll(dependencies);
    files.addAll(filesToParse);
    Common.trimList(files);

    final WinkParser wp = new WinkParser();
    wp.parse(files);
    // wp.print();

    try {
      ScriptableObject.defineClass(thisObj, WinkJsModel.class);
      final WinkJsModel winkJsModel = (WinkJsModel) cx.newObject(thisObj, "WinkJsModel");
      winkJsModel.setCx(cx);
      winkJsModel.setGlobalScope(wp.getGlobalScope());
      // ScriptableObject.putProperty(thisObj, "jsModel",
      // Context.javaToJS(winkJsModel, thisObj));
      return winkJsModel;
    } catch (final IllegalAccessException e) {
      throw new WinkBuildException(e);
View Full Code Here

TOP

Related Classes of com.orange.wink.parse.WinkParser

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.