@@ -204,15 +204,6 @@ Return non-nil if any line breaks were skipped."
204204 " MATCH-STATEMENT-DELIMITER"
205205 current-token))))
206206
207- (defun elixir-smie--implicit-semi-p ()
208- " This function defines the rules that determine whether an implicit `;' will
209- be used as the token."
210- (save-excursion
211- (skip-chars-backward " \t " )
212- (not (or (bolp )
213- (memq (char-before ) '(?\[ ?\( ?\{ ))
214- (eq (save-excursion (elixir-smie-next-token nil )) " OP" )))))
215-
216207(defun elixir-smie-forward-token ()
217208 (elixir-smie-next-token t ))
218209
@@ -221,37 +212,36 @@ be used as the token."
221212
222213(defconst elixir-smie-grammar
223214 (smie-prec2->grammar
224- (smie-merge-prec2s
225- (smie-bnf->prec2
226- '((id)
227- (statements (statement)
228- (statement " ;" statements))
229- (statement (" defrecord" non-block-expr " do" statements " end" )
230- (" def" non-block-expr " do" statements " end" )
231- (non-block-expr " fn" match-statement " end" )
232- (non-block-expr " do" statements " end" )
233- (" if" non-block-expr " do" statements " else" statements " end" )
234- (" if" non-block-expr " do" statements " end" )
235- (" if" non-block-expr " COMMA" " do:" non-block-expr)
236- (" if" non-block-expr " COMMA"
237- " do:" non-block-expr " COMMA"
238- " else:" non-block-expr)
239- (" try" " do" statements " after" statements " end" )
240- (" try" " do" statements " catch" match-statements " end" )
241- (" try" " do" statements " end" )
242- (" case" non-block-expr " do" match-statements " end" ))
243- (non-block-expr (non-block-expr " OP" non-block-expr)
244- (non-block-expr " COMMA" non-block-expr)
245- (" (" statements " )" )
246- (" {" statements " }" )
247- (" [" statements " ]" )
248- (" STRING" ))
249- (match-statements (match-statement " MATCH-STATEMENT-DELIMITER" match-statements)
250- (match-statement))
251- (match-statement (non-block-expr " ->" statements)))
252- '((assoc " if" " do:" " else:" )
253- (assoc " COMMA" )
254- (left " BOOLOPS" ))))))
215+ (smie-bnf->prec2
216+ '((id)
217+ (statements (statement)
218+ (statement " ;" statements))
219+ (statement (" defrecord" non-block-expr " do" statements " end" )
220+ (" def" non-block-expr " do" statements " end" )
221+ (non-block-expr " fn" match-statement " end" )
222+ (non-block-expr " do" statements " end" )
223+ (" if" non-block-expr " do" statements " else" statements " end" )
224+ (" if" non-block-expr " do" statements " end" )
225+ (" if" non-block-expr " COMMA" " do:" non-block-expr)
226+ (" if" non-block-expr " COMMA"
227+ " do:" non-block-expr " COMMA"
228+ " else:" non-block-expr)
229+ (" try" " do" statements " after" statements " end" )
230+ (" try" " do" statements " catch" match-statements " end" )
231+ (" try" " do" statements " end" )
232+ (" case" non-block-expr " do" match-statements " end" ))
233+ (non-block-expr (non-block-expr " OP" non-block-expr)
234+ (non-block-expr " COMMA" non-block-expr)
235+ (" (" statements " )" )
236+ (" {" statements " }" )
237+ (" [" statements " ]" )
238+ (" STRING" ))
239+ (match-statements (match-statement " MATCH-STATEMENT-DELIMITER" match-statements)
240+ (match-statement))
241+ (match-statement (non-block-expr " ->" statements)))
242+ '((assoc " if" " do:" " else:" )
243+ (assoc " COMMA" )
244+ (left " OP" )))))
255245
256246(defvar elixir-smie-indent-basic 2 )
257247
0 commit comments