   "\\(\\w+\\)\\(\\s-*).*\\)?")
 
 ;; vars definition with optional type
-(defconst *pjs-vars-regexp* 
+(defconst *pjs-vars-with-type-regexp* 
 ;;  "^.*var\\s-+\\(\\w+\\)\\s-*\\(=\\|in\\|;\\).*$")
-  "^.*var\\s-*\\([[:word:].]+\\)?\\s-+\\(\\w+\\)\\s-*[=;]")
+  "^.*var\\s-*\\([[:word:].]+\\)\\s-+\\(\\w+\\)\\s-*[=;]")
+
+(defconst *pjs-vars-no-type-regexp* 
+;;  "^.*var\\s-+\\(\\w+\\)\\s-*\\(=\\|in\\|;\\).*$")
+  "^.*var\\s-+\\(\\w+\\)\\s-*[=;]")
+
+(defconst *pjs-var-in-with-type-regexp* 
+;;  "^.*var\\s-+\\(\\w+\\)\\s-*\\(=\\|in\\|;\\).*$")
+  "^.*var\\s-*\\([[:word:].]+\\)\\s-+\\(\\w+\\)\\s-+\\(in\\)")
+
+(defconst *pjs-var-in-no-type-regexp* 
+;;  "^.*var\\s-+\\(\\w+\\)\\s-*\\(=\\|in\\|;\\).*$")
+  "^.*var\\s-+\\(\\w+\\)\\s-+\\(in\\)")
 
 ;; class types, plc.somethinf
 (defconst *pjs-class-type*

  (push (list 'search-buffer-functions 1 font-lock-function-name-face) font-locks)

  ;; Kernel functions
  (push (cons 'search-kernel-functions pjs-kernel-functions-face) font-locks)
  (push (list 'search-kernel-functions 1 pjs-kernel-functions-face) font-locks)

  ;; Variables in the function 
  (push (cons 'search-function-local-vars font-lock-variable-name-face) font-locks)

  ;; Global vars
  (push (cons 'search-global-vars font-lock-variable-name-face) font-locks)
  
  ;; Variable definitions with type
  (push (list *pjs-vars-with-type-regexp* 1 font-lock-type-face) font-locks)
  (push (list *pjs-vars-with-type-regexp* 2 pjs-var-definition-face) font-locks)

  ;; variable definition without type
  (push (list *pjs-vars-no-type-regexp* 1 pjs-var-definition-face) font-locks)

  ;; var in with type
  (push (list *pjs-var-in-with-type-regexp* 1 font-lock-type-face) font-locks)
  (push (list *pjs-var-in-with-type-regexp* 2 pjs-var-definition-face) font-locks)
  (push (list *pjs-var-in-with-type-regexp* 3 font-lock-keyword-face) font-locks)

  ;; var in without type
  (push (list *pjs-var-in-no-type-regexp* 1 pjs-var-definition-face) font-locks)
  (push (list *pjs-var-in-no-type-regexp* 2 font-lock-keyword-face) font-locks)  

  ;; class definitions
  (push (list *pjs-class-definition* 1 font-lock-type-face) font-locks)
