Javascript 可以添加类来解析云代码吗?

Javascript 可以添加类来解析云代码吗?,javascript,parse-platform,Javascript,Parse Platform,我想在解析云代码中添加以下类: function Rule = { this.accessor = new Accessor(); this.act = new Action(); } Rule.prototype.sendEmail = function(email, threshold, bill){ if (this.accessor.check(threshold, bill)){ this.act.actionTake(email,

我想在解析云代码中添加以下类:

   function Rule = {
    this.accessor = new Accessor(); 
    this.act = new Action(); 
}

Rule.prototype.sendEmail = function(email, threshold, bill){
    if (this.accessor.check(threshold, bill)){
        this.act.actionTake(email, threshold, bill); 
    }

}; 

function Accessor = {

}

Accessor.prototype.check = function(threshold, bill){
    return bill > threshold; 
}; 

function Action = {

}

Action.prototype.actionTake = function(email, threshold, bill){
    //send email code 
}; 
但是当我将它添加到javascript文件的最顶端时

我获取
更新失败,无法加载触发器。错误是main.js:1中未捕获的SyntaxErrorL意外标记

解析云代码只是为了定义后台作业和云函数吗?是否可以添加“类”定义来解析云代码

谢谢你

var Rule=function(){
this.accessor=new accessor();
this.act=新动作();
};

函数规则(){
this.accessor=new accessor();
this.act=新动作();
}

基本js语法,与解析无关{ this.accessor=new accessor(); this.act=新动作(); };

函数规则(){
this.accessor=new accessor();
this.act=新动作();
}

基本js语法,与解析无关{ this.accessor=new accessor(); this.act=新动作(); };

函数规则(){
this.accessor=new accessor();
this.act=新动作();
}

基本js语法,与解析无关{ this.accessor=new accessor(); this.act=新动作(); };

函数规则(){
this.accessor=new accessor();
this.act=新动作();
}


基本js语法,与解析无关

谢谢:D.我在写一个简单的java脚本文件,我不知道任何java脚本。谢谢:D.我在写一个简单的java脚本文件,我不知道任何java脚本。谢谢:D.我在写一个简单的java脚本文件,我不知道任何java脚本。谢谢:D.我在写一个简单的java脚本文件,我不知道任何java脚本剧本