Software / code / prosody
Comparison
tools/erlparse.lua @ 2947:ff7f6668b34f
tools/erlparse: Discard erlang PIDs instead of choking on them as a syntax error
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 25 Mar 2010 19:34:41 +0000 |
| parent | 2946:ad306c5ae689 |
| child | 5079:2ab99e239d45 |
comparison
equal
deleted
inserted
replaced
| 2946:ad306c5ae689 | 2947:ff7f6668b34f |
|---|---|
| 119 return t | 119 return t |
| 120 end; | 120 end; |
| 121 end | 121 end |
| 122 local function readBinary() | 122 local function readBinary() |
| 123 read("<"); -- read < | 123 read("<"); -- read < |
| 124 -- Discard PIDs | |
| 125 if isNumeric(peek()) then | |
| 126 while peek() ~= ">" do read(); end | |
| 127 read(">"); | |
| 128 return {}; | |
| 129 end | |
| 124 local t = readTuple(); | 130 local t = readTuple(); |
| 125 read(">") -- read > | 131 read(">") -- read > |
| 126 local ch = peek(); | 132 local ch = peek(); |
| 127 if type(t) == "string" then | 133 if type(t) == "string" then |
| 128 -- binary is a list of integers | 134 -- binary is a list of integers |