From 50759bcbb9191a4c1de1a12448e2a376c95fb04f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 24 Nov 2009 20:28:38 +0100
Subject: [PATCH] First go at supporting the new-style getter and setter
 syntax. Fixes [bug 5122].

Rev: lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike:1.53
---
 lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike b/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike
index cfc77ecdef..74478cc320 100644
--- a/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike
+++ b/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike
@@ -197,9 +197,10 @@ string eatIdentifier(void|int allowScopePrefix) {
     parseError("expected identifier, got %O", s);
   readToken();
 
-  // Special hax for `->symbol and `->symbol=
-  if( s=="`->" && isIdent(peekToken()) )
+  // Special hax for `->symbol and `->symbol=, and `symbol and `symbol=
+  if( (s=="`->" || s=="`") && isIdent(peekToken()) )
   {
+    if (s == "`->") s = "`"; // Convert old to new syntax.
     s += readToken();
     if( peekToken()=="=" )
       s += readToken();
-- 
GitLab