private void Return() { this.SetUpPoint(); this.GetChar(); var retE = new JReturnValue(); this.AddFather(retE); if (this._Char == ';' || this._Char == '}' || this._Char == Tools.AllEndChar) { if (this._Char != ';') { this.ResetUpPoint(); } return; } this.ResetUpPoint(); var fatherFun = retE.GetFather <JFunEleme>(); if (fatherFun == null) { this.Error("未知错误"); } retE.Sing = fatherFun.Sign; var vE = new JValueEleme(); vE.Father = this.NEleme; retE.Value = vE; var valueSpane = new ValueSpan(this.PBParser, vE); valueSpane.Init(); }
public override void Init() { this.SetUpPoint(); this.GetChar(); if (this._Char == this.ArrayEndChar) { return; } this.ResetUpPoint(); Start: var valueE = new JValueEleme(); this.AddFather(valueE); var valueSpan = new ValueSpan(this.PBParser, valueE); valueSpan.Init(); this.GetChar(); switch (this._Char) { case ',': goto Start; default: if (this._Char == ArrayEndChar) { break; } this.Error(); break; } }
private void AddKeyValue() { if (Tools.StrStartChars.Contains(this._Char)) { this._Tag = this.GetString(this._Char); } else { this._Tag = this.PBParser.GetTag(true, false); } this.ValidChar(':'); var vElem = new JValueEleme(); vElem.Father = this.pDictionaryEleme; var vSpan = new ValueSpan(this.PBParser, vElem); vSpan.Init(); this.pDictionaryEleme.Dict.Add(this._Tag, vElem); this.GetChar(); switch (this._Char) { case ',': this.GetChar(); this.AddKeyValue(); break; case '}': break; default: this.Error(); break; } }
/// <summary> /// 索引 /// </summary> private void Index() { Start: this.SetUpPoint(); this.GetChar(); BEleme elem = null; if (Tools.StrStartChars.Contains(this._Char)) { elem = new JConstEleme("\"" + this.GetString(this._Char) + "\"", EValueType.Const); } else if (char.IsNumber(this._Char)) { elem = new JConstEleme(this.GetIntString(), EValueType.Const); } else { this.ResetUpPoint(); elem = new JValueEleme(); elem.Father = this.NEleme; var valueS = new ValueSpan(this.PBParser, elem); valueS.Init(); } this.GetChar(); switch (this._Char) { case ',': goto Start; case ']': var jIndex = new JIndexEleme(); jIndex.IndexEleme = elem; elem.Father = jIndex; this.pVariableAttr.Index = jIndex; jIndex.Father = this.NEleme; this.End(EPType.Index, jIndex); break; default: this.Error(); break; } }