Permalink
Browse files

Change regexps to match namespaced variables.

  • Loading branch information...
1 parent c13835e commit 96d28a326a07d4c83f39737348eded5e44a329d8 @adamsanderson committed Jun 4, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/dox.js
View
@@ -233,15 +233,15 @@ exports.parseCodeContext = function(str){
, string: RegExp.$1 + '()'
};
// prototype method
- } else if (/^(\w+)\.prototype\.(\w+) *= *function/.exec(str)) {
+ } else if (/^([\w\.]+)\.prototype\.(\w+) *= *function/.exec(str)) {
return {
type: 'method'
, constructor: RegExp.$1
, name: RegExp.$2
, string: RegExp.$1 + '.prototype.' + RegExp.$2 + '()'
};
// prototype property
- } else if (/^(\w+)\.prototype\.(\w+) *= *([^\n;]+)/.exec(str)) {
+ } else if (/^([\w\.]+)\.prototype\.(\w+) *= *([^\n;]+)/.exec(str)) {
return {
type: 'property'
, constructor: RegExp.$1
@@ -250,15 +250,15 @@ exports.parseCodeContext = function(str){
, string: RegExp.$1 + '.prototype' + RegExp.$2
};
// method
- } else if (/^(\w+)\.(\w+) *= *function/.exec(str)) {
+ } else if (/^([\w\.]+)\.(\w+) *= *function/.exec(str)) {
return {
type: 'method'
, receiver: RegExp.$1
, name: RegExp.$2
, string: RegExp.$1 + '.' + RegExp.$2 + '()'
};
// property
- } else if (/^(\w+)\.(\w+) *= *([^\n;]+)/.exec(str)) {
+ } else if (/^([\w\.]+)\.(\w+) *= *([^\n;]+)/.exec(str)) {
return {
type: 'property'
, receiver: RegExp.$1

0 comments on commit 96d28a3

Please sign in to comment.