From 2634369ad9f4e8098ae9f9b7a204edfb64ad5b15 Mon Sep 17 00:00:00 2001 From: Martin Nilsson <nilsson@opera.com> Date: Sat, 16 Aug 2014 18:21:22 +0200 Subject: [PATCH] Added more protected. --- lib/modules/Parser.pmod/C.pmod | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/modules/Parser.pmod/C.pmod b/lib/modules/Parser.pmod/C.pmod index 5c29823644..d09792bfc1 100644 --- a/lib/modules/Parser.pmod/C.pmod +++ b/lib/modules/Parser.pmod/C.pmod @@ -90,7 +90,7 @@ class Token //! @decl void create(string text, void|int line, void|string file,@ //! void|string trailing_whitespace) - void create(string t, void|int l, void|string f, void|string space) + protected void create(string t, void|int l, void|string f, void|string space) { text=t; line=l; @@ -99,7 +99,7 @@ class Token } //! If the object is printed as %s it will only output its text contents. - string _sprintf(int how) + protected string _sprintf(int how) { switch(how) { @@ -113,34 +113,34 @@ class Token //! Tokens are considered equal if the text contents are equal. It //! is also possible to compare the Token object with a text string //! directly. - int `==(mixed foo) + protected int `==(mixed foo) { return (objectp(foo) ? foo->text : foo) == text; } //! A string can be added to the Token, which will be added to the //! text contents. - string `+(string ... s) + protected string `+(string ... s) { return predef::`+(text,@s); } //! A string can be added to the Token, which will be added to the //! text contents. - string ``+(string ... s) + protected string ``+(string ... s) { return predef::`+(@s,text); } //! It is possible to case a Token object to a string. The text content //! will be returned. - mixed cast(string to) + protected mixed cast(string to) { if(to=="string") return text; } //! Characters and ranges may be indexed from the text contents of the token. - int|string `[](int a, void|int b) { + protected int|string `[](int a, void|int b) { if(undefinedp(b)) return text[a]; return text[a..b]; } -- GitLab