/* -*- mode: Java; c-basic-offset: 2; -*- */

/**
 * LZX Function representation
 * @author steele@osteele.com
 */

package org.openlaszlo.sc;

public class Function {
  public String name;
  private final String args;
  private final String body;
  private final String sourceLocation;

  public Function(String body) {
    this("", body);
  }

  public Function(String args, String body) {
    this("", args, body);
  }

  public Function(String name, String args, String body) {
    this(name, args, body, null);
  }

  public Function(String name, String args, String body, String loc) {
    this.name = name;
    this.args = args;
    this.body = body;
    this.sourceLocation = loc;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String toString() {
    return (sourceLocation != null?(sourceLocation + "\n"):"") +
      "function " + name + "\n(" + args + "\n) {" + body + "\n}";
  }
}

/**
 * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights
 * Reserved.  Use is subject to license terms.
 */

@@ -795,111 +795,118 @@
 urn 
-(sourceLocation != null?(sourceLocation + %22%5Cn%22):%22%22) +%0A      %22function %22 + name + %22%5Cn(%22 + args + %22%5Cn) %7B%22
+%22function %22 + name + %22%5Cn(%22 + args + %22%5Cn) %7B%22 +%0A      %22%5Cn%22 + (sourceLocation != null?(sourceLocation + %22%5Cn%22):%22%22)
  + b

Change 20080312-hqm-S by hqm@badtzmaru.local on 2008-03-12 12:51:00 EDT in /Users/hqm/openlaszlo/trunk2/WEB-INF/lps/server/src for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/server/src