mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Enhance parser
This commit is contained in:
@@ -62,10 +62,11 @@ namespace LuaWeather
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Regenerates the &Weather, causing it to change based on the below statistics.
|
* Regenerates the &Weather, causing it to change based on the below statistics.
|
||||||
* - 30% chance of no change
|
*
|
||||||
* - 30% chance of &Weather getting better (if not fine) or changing &Weather type
|
* * 30% chance of no change
|
||||||
* - 30% chance of &Weather getting worse (if not fine)
|
* * 30% chance of &Weather getting better (if not fine) or changing &Weather type
|
||||||
* - 10% chance of radical change (if not fine)
|
* * 30% chance of &Weather getting worse (if not fine)
|
||||||
|
* * 10% chance of radical change (if not fine)
|
||||||
*
|
*
|
||||||
* @return bool changed : returns 'true' if &Weather changed
|
* @return bool changed : returns 'true' if &Weather changed
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ class ParameterDoc(object):
|
|||||||
self.description += '<p><em>Valid numbers</em>: all decimal numbers.</p>'
|
self.description += '<p><em>Valid numbers</em>: all decimal numbers.</p>'
|
||||||
|
|
||||||
self.data_type = 'number'
|
self.data_type = 'number'
|
||||||
|
elif self.data_type == 'bool':
|
||||||
|
self.data_type = 'boolean'
|
||||||
|
elif self.data_type == 'uint64':
|
||||||
|
self.data_type = 'string'
|
||||||
|
|
||||||
|
|
||||||
class MethodDoc(object):
|
class MethodDoc(object):
|
||||||
@@ -106,7 +110,7 @@ class ClassParser(object):
|
|||||||
|
|
||||||
param_regex = re.compile(r"""\s*\*\s@param\s # The @param tag starts with opt. whitespace followed by "* @param ".
|
param_regex = re.compile(r"""\s*\*\s@param\s # The @param tag starts with opt. whitespace followed by "* @param ".
|
||||||
([&\w]+)\s(\w+) # The data type, a space, and the name of the param.
|
([&\w]+)\s(\w+) # The data type, a space, and the name of the param.
|
||||||
(?:\s=\s(.+))? # The default value: a = surrounded by spaces, followed by text.
|
(?:\s=\s(.-))? # The default value: a = surrounded by spaces, followed by text.
|
||||||
(?:\s:\s(.+))? # The description: a colon surrounded by spaces, followed by text.""",
|
(?:\s:\s(.+))? # The description: a colon surrounded by spaces, followed by text.""",
|
||||||
re.X)
|
re.X)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user