constructor¶
-
Function.
constructor
(comment, start_line_idx, line, indent, is_generator, fnc_name, parent_class)¶ コンストラクタ
関数定義の開始行の情報を保存する。
ソース¶
constructor(comment, start_line_idx, line, indent, is_generator, fnc_name, parent_class) {
this.comment = comment;
this.startLineIdx = start_line_idx;
this.indent = indent;
this.isGenerator = is_generator;
this.fncName = fnc_name;
this.parentClass = parent_class;
this.head = line.trim();
if (this.head.endsWith("{")) {
// 関数定義の開始行の末尾が"{"の場合
// 末尾の"{"を取り除く。
this.head = this.head.substring(0, this.head.length - 1);
}
console.log("メソッド " + this.fncName);
}